Package de.willuhn.jameica.gui.input
Class ColorInput
java.lang.Object
de.willuhn.jameica.gui.input.AbstractInput
de.willuhn.jameica.gui.input.ButtonInput
de.willuhn.jameica.gui.input.ColorInput
Eingabefeld, zur Auswahl einer Farbe.
- Author:
- willuhn
-
Field Summary
Fields inherited from class de.willuhn.jameica.gui.input.ButtonInput
buttonEnabled, clientControl, clientControlEnabled, value
Fields inherited from interface de.willuhn.jameica.gui.input.Input
DATAKEY_TOOLTIP
-
Constructor Summary
ConstructorsConstructorDescriptionColorInput
(org.eclipse.swt.graphics.Color color, boolean foreground) Erzeugt ein neues ColorInput mit der angegebenen Farbe. -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.swt.widgets.Control
getClientControl
(org.eclipse.swt.widgets.Composite parent) Liefert das einzubettende Eingabefeld.getValue()
Liefert die aktuell ausgewaehlte Farbe.void
Erwartet ein Objekt vom TypColor
.protected void
update()
Leer ueberschrieben, weil wir hier keine Farbaenderungen wollenMethods 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, addListener, getData, getName, getParent, getStyleBits, hasChanged, isMandatory, paint, paint, setComment, setData, setInvalidChars, setMandatory, setName, setValidChars
-
Constructor Details
-
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 Details
-
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 classButtonInput
- Parameters:
parent
- Composite, in dem sich das ClientControl malen soll.- Returns:
- das fertig gemalte Control.
-
getValue
Liefert die aktuell ausgewaehlte Farbe.- Returns:
- Rueckgabewert vom Typ
Color
.
-
setValue
Erwartet ein Objekt vom TypColor
.- Parameters:
value
- der neu anzuzeigende Wert.
-
update
Leer ueberschrieben, weil wir hier keine Farbaenderungen wollen- Overrides:
update
in classButtonInput
- Throws:
OperationCanceledException
-