jigcell.compare.ui
Class CustomizableInterface

java.lang.Object
  extended by jigcell.compare.ui.CustomizableInterface
All Implemented Interfaces:
java.awt.event.MouseListener, java.util.EventListener, ICustomizableInterface
Direct Known Subclasses:
ObjectiveInterface, TransformInterface

public abstract class CustomizableInterface
extends java.lang.Object
implements ICustomizableInterface, java.awt.event.MouseListener

Interface for a ProgrammableDataGenerator.

This code is licensed under the DARPA BioCOMP Open Source License. See LICENSE for more details.

Author:
Nicholas Allen

Field Summary
protected  java.util.Map customizers
          Customizers managed by this view
protected static java.util.Map DESCRIPTION_INPUT
          Description for the input of a generator
protected static java.util.Map DESCRIPTION_OUTPUT
          Description for the output of a generator
protected  IProgrammableDataGenerator generator
          Generator
protected  java.lang.Object LOCK_CUSTOMIZERS
          Lock for manipulating customizers map
protected  InterfaceBuilder manager
          Interface manager
protected  MenuBuilder menuManager
          Builds menus for the interface
protected  boolean multipleViewSupport
          Whether this interface support multiple, simultaneous views
static java.lang.String PATH_DESCRIPTION_INPUT
          Path fragment where input description is stored
static java.lang.String PATH_DESCRIPTION_OUTPUT
          Path fragment where output description is stored
static java.lang.String PATH_HELP
          Path where help files are stored
protected  javax.swing.JPopupMenu popup
          Context menu
static java.lang.String POPUP_DEFAULT
          Default name for the popup menu
protected static java.lang.String PROPERTY_CUSTOMIZERNAME
          Component client property for customizer name
 
Fields inherited from interface jigcell.compare.ICustomizableInterface
DIMENSION_HELP, OPTION_INPUTDESCRIPTION, OPTION_OUTPUTDESCRIPTION
 
Constructor Summary
CustomizableInterface(IProgrammableDataGenerator generator)
          Creates a new interface for a ProgrammableDataGenerator.
 
Method Summary
protected abstract  javax.swing.JComponent createCustomizer()
          Generates a new customizer for the generator.
 javax.swing.JComponent createCustomizer(java.lang.String name)
          A customization component for a generator.
protected  javax.swing.JPopupMenu createPopup()
          Creates a context menu for the view.
protected  void decorateCustomizer(javax.swing.JComponent component)
          Applies standard decorations to a customizer.
 void destroyCustomizer(java.lang.String name)
          Destroys a customization component created by this interface.
protected  Compare getCompare()
          Comparator for the generator.
 IComponentDescription getInputDescription()
          A description of the input of this data source.
 IComponentDescription getOutputDescription()
          A description of the output of this data source.
 boolean hasMultipleViewSupport()
          Whether this interface supports multiple, simultaneous views.
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
protected  void setInputDescription(IComponentDescription description)
          Sets an HTML formatted description of the input of this generator.
protected  void setMultipleViewSupport(boolean multipleViewSupport)
          Sets whether this interface supports multiple views.
protected  void setOutputDescription(IComponentDescription description)
          Sets an HTML formatted description of the output of this generator.
 void updateInterface(java.lang.String propertyName)
          Updates customizers based on the generator state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PATH_HELP

public static final java.lang.String PATH_HELP
Path where help files are stored

See Also:
Constant Field Values

PATH_DESCRIPTION_INPUT

public static final java.lang.String PATH_DESCRIPTION_INPUT
Path fragment where input description is stored

See Also:
Constant Field Values

PATH_DESCRIPTION_OUTPUT

public static final java.lang.String PATH_DESCRIPTION_OUTPUT
Path fragment where output description is stored

See Also:
Constant Field Values

POPUP_DEFAULT

public static final java.lang.String POPUP_DEFAULT
Default name for the popup menu

See Also:
Constant Field Values

DESCRIPTION_INPUT

protected static final java.util.Map DESCRIPTION_INPUT
Description for the input of a generator


DESCRIPTION_OUTPUT

protected static final java.util.Map DESCRIPTION_OUTPUT
Description for the output of a generator


PROPERTY_CUSTOMIZERNAME

protected static final java.lang.String PROPERTY_CUSTOMIZERNAME
Component client property for customizer name

See Also:
Constant Field Values

multipleViewSupport

protected boolean multipleViewSupport
Whether this interface support multiple, simultaneous views


manager

protected final InterfaceBuilder manager
Interface manager


generator

protected final IProgrammableDataGenerator generator
Generator


popup

protected transient javax.swing.JPopupMenu popup
Context menu


customizers

protected final transient java.util.Map customizers
Customizers managed by this view


menuManager

protected transient MenuBuilder menuManager
Builds menus for the interface


LOCK_CUSTOMIZERS

protected final transient java.lang.Object LOCK_CUSTOMIZERS
Lock for manipulating customizers map

Constructor Detail

CustomizableInterface

public CustomizableInterface(IProgrammableDataGenerator generator)
Creates a new interface for a ProgrammableDataGenerator.

Parameters:
generator - Generator
Method Detail

createCustomizer

public javax.swing.JComponent createCustomizer(java.lang.String name)
A customization component for a generator.

Specified by:
createCustomizer in interface ICustomizableInterface
Parameters:
name - Identifying name for the customizer. Each unique expected usage of a customizer should have a distinct name.

destroyCustomizer

public void destroyCustomizer(java.lang.String name)
Destroys a customization component created by this interface.

Specified by:
destroyCustomizer in interface ICustomizableInterface
Parameters:
name - Identifying name for the customizer

getInputDescription

public IComponentDescription getInputDescription()
A description of the input of this data source.

Specified by:
getInputDescription in interface ICustomizableInterface

getOutputDescription

public IComponentDescription getOutputDescription()
A description of the output of this data source.

Specified by:
getOutputDescription in interface ICustomizableInterface

hasMultipleViewSupport

public boolean hasMultipleViewSupport()
Whether this interface supports multiple, simultaneous views.

Specified by:
hasMultipleViewSupport in interface ICustomizableInterface

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

updateInterface

public void updateInterface(java.lang.String propertyName)
Updates customizers based on the generator state.

Specified by:
updateInterface in interface ICustomizableInterface
Parameters:
propertyName - Name of the property that changed or null to indicate that all properties may have changed

createCustomizer

protected abstract javax.swing.JComponent createCustomizer()
Generates a new customizer for the generator.


createPopup

protected javax.swing.JPopupMenu createPopup()
Creates a context menu for the view.


decorateCustomizer

protected void decorateCustomizer(javax.swing.JComponent component)
Applies standard decorations to a customizer. This method is called after a customizer is created or updated.

Parameters:
component - Customizer

getCompare

protected Compare getCompare()
Comparator for the generator.


setInputDescription

protected void setInputDescription(IComponentDescription description)
Sets an HTML formatted description of the input of this generator.

Parameters:
description - Input description

setMultipleViewSupport

protected void setMultipleViewSupport(boolean multipleViewSupport)
Sets whether this interface supports multiple views.

Parameters:
multipleViewSupport - Whether this interface supports multiple, simultaneous views

setOutputDescription

protected void setOutputDescription(IComponentDescription description)
Sets an HTML formatted description of the output of this generator.

Parameters:
description - Output description