|
org.eclipse.rse.ui.widgets
Class InheritButton
java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.rse.ui.widgets.InheritButton
-
All Implemented Interfaces:
-
Drawable
-
public class InheritButton
- extends
Composite
An InheritButton is a specialized control that
wraps a push button control with two states:
"inherit" and "local". The initial state is "inherit". The button is
painted with arrowhead image that points either left or right if the
button is in "inherit" or "local" state respectively.
Pressing the button will trigger a SelectionEvent which the client
can listen for. Typically the client will use this to change the
button state.
An InheritButton is assumed to exist inside a composite control with a GridLayout.
There is no need to set its layout data unless you wish to override the
default characteristics.
Although this control extends Composite, it does not make sense to
add children to this control or to set a layout on it.
Fields inherited from class org.eclipse.swt.widgets.
Widget
|
handle
|
Methods inherited from class org.eclipse.swt.widgets.
Composite
|
changed,
checkSubclass,
computeSize,
getBackgroundMode,
getChildren,
getClientArea,
getLayout,
getLayoutDeferred,
getTabList,
isLayoutDeferred,
layout,
layout,
layout,
layout,
setBackgroundMode,
setLayout,
setLayoutDeferred,
setTabList
|
Methods inherited from class org.eclipse.swt.widgets.
Control
|
addControlListener,
addDragDetectListener,
addFocusListener,
addHelpListener,
addMenuDetectListener,
addMouseListener,
addMouseMoveListener,
addMouseTrackListener,
addMouseWheelListener,
addPaintListener,
addTraverseListener,
computeSize,
dragDetect,
dragDetect,
forceFocus,
getAccessible,
getBackground,
getBackgroundImage,
getBounds,
getCursor,
getData,
getDragDetect,
getEnabled,
getFont,
getForeground,
getLayoutData,
getLocation,
getMenu,
getMonitor,
getParent,
getRegion,
getShell,
getSize,
getVisible,
internal_dispose_GC,
internal_new_GC,
isEnabled,
isReparentable,
isVisible,
moveAbove,
moveBelow,
pack,
pack,
print,
redraw,
redraw,
removeControlListener,
removeDragDetectListener,
removeFocusListener,
removeHelpListener,
removeMenuDetectListener,
removeMouseListener,
removeMouseMoveListener,
removeMouseTrackListener,
removeMouseWheelListener,
removePaintListener,
removeTraverseListener,
setBackground,
setBackgroundImage,
setBounds,
setBounds,
setCapture,
setCursor,
setDragDetect,
setEnabled,
setFont,
setForeground,
setLayoutData,
setLocation,
setLocation,
setMenu,
setParent,
setRedraw,
setRegion,
setSize,
setSize,
setVisible,
toControl,
toControl,
toDisplay,
toDisplay,
traverse,
update
|
Methods inherited from class org.eclipse.swt.widgets.
Widget
|
addDisposeListener,
addListener,
checkWidget,
dispose,
getData,
getDisplay,
getListeners,
getStyle,
isDisposed,
isListening,
notifyListeners,
removeDisposeListener,
removeListener,
removeListener,
setData,
setData,
toString
|
DEFAULT_WIDTH
public static final int DEFAULT_WIDTH
- Value is 12 pixels.
-
See Also:
-
Constant Field Values
DEFAULT_HEIGHT
public static final int DEFAULT_HEIGHT
- Value is 20 pixels.
-
See Also:
-
Constant Field Values
InheritButton
public InheritButton(
Composite parent)
- Create a new InheritButton.
-
Parameters:
-
parent - the composite owning this button
setLocal
public void setLocal(boolean isLocal)
- Set the inherit/local state.
In the "local" state, the arrow image points to the right.
In the "inherit" state, the arrow image points to the left.
-
-
Parameters:
-
isLocal - true if the button should be in "local" state. false if the
button should be in "inherit" state.
isLocal
public boolean isLocal()
- Query the inherit/local state.
-
-
Returns:
- true if the button is in local state
addSelectionListener
public void addSelectionListener(
SelectionListener listener)
- Register a listener interested in when the button is pressed.
-
-
See Also:
-
removeSelectionListener(SelectionListener)
addKeyListener
public void addKeyListener(
KeyListener listener)
-
-
Overrides:
-
addKeyListener
in class
Control
-
removeKeyListener
public void removeKeyListener(
KeyListener listener)
-
-
Overrides:
-
removeKeyListener
in class
Control
-
removeSelectionListener
public void removeSelectionListener(
SelectionListener listener)
- Remove a previously set selection listener.
-
-
See Also:
-
addSelectionListener(SelectionListener)
setFocus
public boolean setFocus()
-
-
Overrides:
-
setFocus
in class
Composite
-
isFocusControl
public boolean isFocusControl()
-
-
Overrides:
-
isFocusControl
in class
Control
-
setToolTipText
public void setToolTipText(
String string)
-
-
Overrides:
-
setToolTipText
in class
Control
-
getToolTipText
public
String getToolTipText()
-
-
Overrides:
-
getToolTipText
in class
Control
-
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.
|
|