Remote Systems
v6.4.1

com.ibm.etools.systems.core.ui.widgets
Class InheritButton

java.lang.Object
  extended byComposite
      extended bycom.ibm.etools.systems.core.ui.widgets.InheritButton

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.

See Also:
Serialized Form

Field Summary
static int DEFAULT_HEIGHT
          Value is 20 pixels.
static int DEFAULT_WIDTH
          Value is 12 pixels.
 
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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

InheritButton

public InheritButton(Composite parent)
Create a new InheritButton.

Parameters:
parent -
Method Detail

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)

removeKeyListener

public void removeKeyListener(KeyListener listener)

removeSelectionListener

public void removeSelectionListener(SelectionListener listener)
Remove a previously set selection listener.

See Also:
addSelectionListener(SelectionListener)

setFocus

public boolean setFocus()

isFocusControl

public boolean isFocusControl()

setToolTipText

public void setToolTipText(String string)

getToolTipText

public String getToolTipText()

Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.