Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.ui.widgets
Class InheritButton


java.lang.Object
  extended by 

org.eclipse.swt.widgets.Widget
      extended by 

org.eclipse.swt.widgets.Control
          extended by 

org.eclipse.swt.widgets.Scrollable
              extended by 

org.eclipse.swt.widgets.Composite
                  extended by 
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.


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, getBackgroundMode, getChildren, getClientArea, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, 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. 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
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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 - the composite owning this button
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)
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

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire