Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.style.editors
Class ColorEditor

java.lang.Object
  extended by eu.esdihumboldt.hale.ui.style.editors.ColorEditor
All Implemented Interfaces:
Editor<org.eclipse.swt.graphics.RGB>

public class ColorEditor
extends Object
implements Editor<org.eclipse.swt.graphics.RGB>

A color editor button

Author:
Simon Templer
Partner:
01 / Fraunhofer Institute for Computer Graphics Research

Constructor Summary
ColorEditor(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.graphics.RGB color)
          Create a color editor button
 
Method Summary
 org.eclipse.swt.graphics.Color getColor(org.eclipse.swt.graphics.Device device)
          Get the color, it has to be disposed by the caller
 org.eclipse.swt.widgets.Control getControl()
          Get the editor control
 org.eclipse.swt.graphics.RGB getValue()
          Get the value
protected  void init(org.eclipse.swt.widgets.Control control)
          Determine with and height
 boolean isChanged()
          States if the value has been changed
 void setValue(org.eclipse.swt.graphics.RGB color)
          Set the value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorEditor

public ColorEditor(org.eclipse.swt.widgets.Composite parent,
                   org.eclipse.swt.graphics.RGB color)
Create a color editor button

Parameters:
parent - the parent composite
color - the initial color
Method Detail

init

protected void init(org.eclipse.swt.widgets.Control control)
Determine with and height

Parameters:
control - the parent control

getColor

public org.eclipse.swt.graphics.Color getColor(org.eclipse.swt.graphics.Device device)
Get the color, it has to be disposed by the caller

Parameters:
device - the device for the color
Returns:
the color

getValue

public org.eclipse.swt.graphics.RGB getValue()
Description copied from interface: Editor
Get the value

Specified by:
getValue in interface Editor<org.eclipse.swt.graphics.RGB>
Returns:
the value
See Also:
Editor.getValue()

setValue

public void setValue(org.eclipse.swt.graphics.RGB color)
Description copied from interface: Editor
Set the value

Specified by:
setValue in interface Editor<org.eclipse.swt.graphics.RGB>
Parameters:
color - the value to set
See Also:
Editor.setValue(Object)

getControl

public org.eclipse.swt.widgets.Control getControl()
Description copied from interface: Editor
Get the editor control

Specified by:
getControl in interface Editor<org.eclipse.swt.graphics.RGB>
Returns:
the editor control
See Also:
Editor.getControl()

isChanged

public boolean isChanged()
Description copied from interface: Editor
States if the value has been changed

Specified by:
isChanged in interface Editor<org.eclipse.swt.graphics.RGB>
Returns:
if the value has been changed
See Also:
Editor.isChanged()

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d