|
RSE Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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
public class InheritButton
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.
Field Summary | |
---|---|
static int |
DEFAULT_HEIGHT
Value is 20 pixels. |
static int |
DEFAULT_WIDTH
Value is 12 pixels. |
Fields inherited from class org.eclipse.swt.widgets.Composite |
---|
embeddedHandle |
Fields inherited from class org.eclipse.swt.widgets.Widget |
---|
handle |
Constructor Summary | |
---|---|
InheritButton(Composite parent)
Create a new InheritButton. |
Method Summary | |
---|---|
void |
addKeyListener(KeyListener listener)
|
void |
addSelectionListener(SelectionListener listener)
Register a listener interested in when the button is pressed. |
String |
getToolTipText()
|
boolean |
isFocusControl()
|
boolean |
isLocal()
Query the inherit/local state. |
void |
removeKeyListener(KeyListener listener)
|
void |
removeSelectionListener(SelectionListener listener)
Remove a previously set selection listener. |
boolean |
setFocus()
|
void |
setLocal(boolean isLocal)
Set the inherit/local state. |
void |
setToolTipText(String string)
|
Methods inherited from class org.eclipse.swt.widgets.Composite |
---|
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getClientArea, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setLayout, setLayoutDeferred, setTabList |
Methods inherited from class org.eclipse.swt.widgets.Scrollable |
---|
computeTrim, getBorderWidth, getHorizontalBar, getVerticalBar |
Methods inherited from class org.eclipse.swt.widgets.Widget |
---|
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_WIDTH
public static final int DEFAULT_HEIGHT
Constructor Detail |
---|
public InheritButton(Composite parent)
parent
- the composite owning this buttonMethod Detail |
---|
public void setLocal(boolean isLocal)
isLocal
- true if the button should be in "local" state. false if the
button should be in "inherit" state.public boolean isLocal()
public void addSelectionListener(SelectionListener listener)
removeSelectionListener(SelectionListener)
public void addKeyListener(KeyListener listener)
addKeyListener
in class Control
public void removeKeyListener(KeyListener listener)
removeKeyListener
in class Control
public void removeSelectionListener(SelectionListener listener)
addSelectionListener(SelectionListener)
public boolean setFocus()
setFocus
in class Composite
public boolean isFocusControl()
isFocusControl
in class Control
public void setToolTipText(String string)
setToolTipText
in class Control
public String getToolTipText()
getToolTipText
in class Control
|
RSE Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |