de.willuhn.jameica.gui.input
Class ColorInput

java.lang.Object
  extended by de.willuhn.jameica.gui.input.AbstractInput
      extended by de.willuhn.jameica.gui.input.ButtonInput
          extended by de.willuhn.jameica.gui.input.ColorInput
All Implemented Interfaces:
Input, Part

public class ColorInput
extends ButtonInput

Eingabefeld, zur Auswahl einer Farbe.

Author:
willuhn

Field Summary
 
Fields inherited from class de.willuhn.jameica.gui.input.ButtonInput
buttonEnabled, clientControl, clientControlEnabled, value
 
Constructor Summary
ColorInput(org.eclipse.swt.graphics.Color color, boolean foreground)
          Erzeugt ein neues ColorInput mit der angegebenen Farbe.
 
Method Summary
 org.eclipse.swt.widgets.Control getClientControl(org.eclipse.swt.widgets.Composite parent)
          Liefert das einzubettende Eingabefeld.
 java.lang.Object getValue()
          Liefert die aktuell ausgewaehlte Farbe.
 void setValue(java.lang.Object value)
          Erwartet ein Objekt vom Typ Color.
 
Methods inherited from class de.willuhn.jameica.gui.input.ButtonInput
addButtonListener, disable, disableButton, disableClientControl, enable, enableButton, enableClientControl, focus, getControl, isEnabled, setButtonImage, setButtonText, setEnabled
 
Methods inherited from class de.willuhn.jameica.gui.input.AbstractInput
addListener, getName, getParent, getStyleBits, hasChanged, isMandatory, paint, paint, setComment, setInvalidChars, setMandatory, setName, setValidChars
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorInput

public ColorInput(org.eclipse.swt.graphics.Color color,
                  boolean foreground)
Erzeugt ein neues ColorInput mit der angegebenen Farbe.

Parameters:
color - initial anzuzeigende Farbe.
foreground - true, wenn es sich um eine Vordergrundfarbe handelt.
Method Detail

getClientControl

public org.eclipse.swt.widgets.Control getClientControl(org.eclipse.swt.widgets.Composite parent)
Description copied from class: ButtonInput
Liefert das einzubettende Eingabefeld.

Specified by:
getClientControl in class ButtonInput
Parameters:
parent - Composite, in dem sich das ClientControl malen soll.
Returns:
das fertig gemalte Control.
See Also:
ButtonInput.getClientControl(org.eclipse.swt.widgets.Composite)

getValue

public java.lang.Object getValue()
Liefert die aktuell ausgewaehlte Farbe. Rueckgabewert vom Typ Color.

Returns:
Wert des Feldes.
See Also:
Input.getValue()

setValue

public void setValue(java.lang.Object value)
Erwartet ein Objekt vom Typ Color.

Parameters:
value - der neu anzuzeigende Wert.
See Also:
Input.setValue(java.lang.Object)