com.groovemanager.gui.custom.controls
Class EnumControlComposite

java.lang.Object
  extended by com.groovemanager.gui.custom.CustomComposite
      extended by com.groovemanager.gui.custom.controls.EnumControlComposite
All Implemented Interfaces:
ControlContainer

public class EnumControlComposite
extends CustomComposite
implements ControlContainer

Author:
Manu

Field Summary
private  boolean auto
          Indicates whether auto-apply is set to on or off
private  org.eclipse.swt.widgets.Combo combo
          The drop-down list for user-selection of the value
private  javax.sound.sampled.EnumControl control
          The EnumControl to edit
 
Constructor Summary
EnumControlComposite(javax.sound.sampled.EnumControl control, org.eclipse.swt.widgets.Composite parent)
          Construct a new EnumControlComposite using SWT.NONE style
EnumControlComposite(javax.sound.sampled.EnumControl control, org.eclipse.swt.widgets.Composite parent, int style)
          Construct a new EnumControlComposite
 
Method Summary
 void apply()
          Appl the changes made by the user to the underlying Control instance
protected  org.eclipse.swt.widgets.Composite createComposite(org.eclipse.swt.widgets.Composite parent, int style)
          This method is to be overwritten by concrete subclasses to create the real contents of this CustomComposite
protected  int[] getListenerTypes()
          For all types of listeners that should be possible to add to this Composite directly, the corresponding SWT.* constant should be contained in the returned Array.
protected  int getPossibleStyles()
          Get a combination of all allowed SWT.* style constants
 void reset()
          Reset the GUI elements to the value of the underlying Control instance
 void setAutoApply(boolean auto)
          Set this Container into auto-apply mode or out of auto-apply mode.
 
Methods inherited from class com.groovemanager.gui.custom.CustomComposite
addListener, checkStyle, getComposite, getData, getListeners, getParent, removeListener, setData, setLayoutData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

auto

private boolean auto
Indicates whether auto-apply is set to on or off


combo

private org.eclipse.swt.widgets.Combo combo
The drop-down list for user-selection of the value


control

private javax.sound.sampled.EnumControl control
The EnumControl to edit

Constructor Detail

EnumControlComposite

public EnumControlComposite(javax.sound.sampled.EnumControl control,
                            org.eclipse.swt.widgets.Composite parent)
Construct a new EnumControlComposite using SWT.NONE style

Parameters:
control - The EnumControl to edit
parent - The parent Composite

EnumControlComposite

public EnumControlComposite(javax.sound.sampled.EnumControl control,
                            org.eclipse.swt.widgets.Composite parent,
                            int style)
Construct a new EnumControlComposite

Parameters:
control - The EnumControl to edit
parent - The parent Composite
style - Combination of SWT.* style constants
Method Detail

apply

public void apply()
Description copied from interface: ControlContainer
Appl the changes made by the user to the underlying Control instance

Specified by:
apply in interface ControlContainer
See Also:
ControlContainer.apply()

createComposite

protected org.eclipse.swt.widgets.Composite createComposite(org.eclipse.swt.widgets.Composite parent,
                                                            int style)
Description copied from class: CustomComposite
This method is to be overwritten by concrete subclasses to create the real contents of this CustomComposite

Specified by:
createComposite in class CustomComposite
Parameters:
parent - The parent Composite under which this Composite should be created
style - Combination of valid SWT.* style constants
Returns:
The new created main composite
See Also:
CustomComposite.createComposite(org.eclipse.swt.widgets.Composite, int)

getListenerTypes

protected int[] getListenerTypes()
Description copied from class: CustomComposite
For all types of listeners that should be possible to add to this Composite directly, the corresponding SWT.* constant should be contained in the returned Array.

Specified by:
getListenerTypes in class CustomComposite
Returns:
An Array of SWT.* constants defining the set of listeners types applicable to this Composite
See Also:
CustomComposite.getListenerTypes()

getPossibleStyles

protected int getPossibleStyles()
Description copied from class: CustomComposite
Get a combination of all allowed SWT.* style constants

Specified by:
getPossibleStyles in class CustomComposite
Returns:
A combination of all allowed style constants, for example SWT.BORDER | SWT.LEFT | SWT.BORDER
See Also:
CustomComposite.getPossibleStyles()

reset

public void reset()
Description copied from interface: ControlContainer
Reset the GUI elements to the value of the underlying Control instance

Specified by:
reset in interface ControlContainer
See Also:
ControlContainer.reset()

setAutoApply

public void setAutoApply(boolean auto)
Description copied from interface: ControlContainer
Set this Container into auto-apply mode or out of auto-apply mode. In auto-apply mode all changes made by the user will be directly made to the underlying Control instance

Specified by:
setAutoApply in interface ControlContainer
Parameters:
auto - true if auto-apply should be turned on, false otherwise
See Also:
ControlContainer.setAutoApply(boolean)