DESY ACOP Beans Home

com.cosylab.gui.components.customizer
Class Customizer

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.cosylab.gui.components.customizer.Customizer
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

Deprecated. Use AbstractCustomizerPanel

public class Customizer
extends javax.swing.JPanel

Customizer is used for displaying diferent Editor s of a displayer component. It is a javax.swing.JPanel containing a tree of availble editor aspects and a panel containing the selected aspect editors. The component also supports display via popup dialog.

Version:
$id$
Author:
Igor Kriznar , Jernej Kamenik
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Customizer()
          Deprecated. Creates an empty Customizer with no displayer or editors.
Customizer(javax.swing.JComponent disp, java.util.Map<java.lang.String,java.lang.Class> editorTypes)
          Deprecated. Creates a Customizer for provided arbitrary displayer component with specified editor types.
Customizer(SimpleDisplayer disp)
          Deprecated. Creates a Customizer for provided com.cosylab.gui.components.SimpleDisplayer.
 
Method Summary
 void addEditors(java.util.Map<java.lang.String,java.lang.Class> newEditorTypes)
          Deprecated. Adds map with editors to this customizer, overrides existing editors with same aspect.
 boolean containsEditor(java.lang.String aspect)
          Deprecated. Determines wether the customizer contains an editor type asociated the specified aspect.
 javax.swing.JPanel getAspectPanel()
          Deprecated.  
 javax.swing.JTree getAspectTree()
          Deprecated.  
 javax.swing.JComponent getDisplayer()
          Deprecated. Gets the dsiplayer component to be customized by this customizer.
 Editor getEditor(java.lang.Class type)
          Deprecated. Returns a live editor instance for the specified type, if it is registered in pair with any of aspects.
 Editor getEditor(java.lang.String aspect)
          Deprecated. Returns a live editor instance for the specified aspect.
static Customizer loadDefaultCustomizer(javax.swing.JComponent disp)
          Deprecated.  Trys to load default Editor s for specified displayer.
static java.util.Map<java.lang.String,java.lang.Class> loadDefaultEditorTypes(java.lang.Object disp)
          Deprecated. Trys to load default Editor s for specified displayer.
 void setDisplayer(javax.swing.JComponent component)
          Deprecated. Sets the displayer component to be customized
 javax.swing.JDialog showDialog()
          Deprecated.  Shows Customizer dialog centered around customized displayer.
 javax.swing.JDialog showDialog(java.awt.Component c)
          Deprecated.  Shows customizer dialog centered around specified component.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Customizer

public Customizer()
Deprecated. 
Creates an empty Customizer with no displayer or editors.


Customizer

public Customizer(SimpleDisplayer disp)
Deprecated. 
Creates a Customizer for provided com.cosylab.gui.components.SimpleDisplayer.

Parameters:
disp - the displayer to be customized.

Customizer

public Customizer(javax.swing.JComponent disp,
                  java.util.Map<java.lang.String,java.lang.Class> editorTypes)
Deprecated. 
Creates a Customizer for provided arbitrary displayer component with specified editor types.

Parameters:
disp - the component to be customized.
editorTypes - mappings of available aspects and coresponding editor types
Method Detail

getEditor

public Editor getEditor(java.lang.String aspect)
                 throws java.lang.InstantiationException,
                        java.lang.IllegalAccessException
Deprecated. 
Returns a live editor instance for the specified aspect.

Parameters:
aspect - an aspect
Returns:
instance of editor if used by this customizer or null
Throws:
java.lang.InstantiationException - if instantiation fails
java.lang.IllegalAccessException - if instantiation fails

getEditor

public Editor getEditor(java.lang.Class type)
                 throws java.lang.InstantiationException,
                        java.lang.IllegalAccessException
Deprecated. 
Returns a live editor instance for the specified type, if it is registered in pair with any of aspects.

Parameters:
type - Class of the editor
Returns:
instance of editor if used by this customizer or null
Throws:
java.lang.InstantiationException - if instantiation fails
java.lang.IllegalAccessException - if instantiation fails

containsEditor

public boolean containsEditor(java.lang.String aspect)
Deprecated. 
Determines wether the customizer contains an editor type asociated the specified aspect.

Parameters:
aspect -
Returns:
true if the customizer contains an editor type asociated with the aspect and false otherwise

showDialog

public javax.swing.JDialog showDialog(java.awt.Component c)
Deprecated. 

Shows customizer dialog centered around specified component.

Dialog title is composed from customiser name. Initial size is set to the size of customiser.

Parameters:
c - a component on which customizer dialog to be centered
Returns:
a javax.swing.JDialog instance with customizer

showDialog

public javax.swing.JDialog showDialog()
Deprecated. 

Shows Customizer dialog centered around customized displayer.

Dialog title is composed from Customizer name. Initial size is set to the size of Customizer.

Returns:
a JDialog instance with customizer

loadDefaultCustomizer

public static Customizer loadDefaultCustomizer(javax.swing.JComponent disp)
Deprecated. 

Trys to load default Editor s for specified displayer. Trys to load first default editors with #looadDefaultEditors() and then creates new Customizer.

Customizer tys to listen, when dispalyer is not visible any more and close itself.

Parameters:
disp - a displayer for witch customizer is to be created
Returns:
new customizer for speficied displayer

loadDefaultEditorTypes

public static java.util.Map<java.lang.String,java.lang.Class> loadDefaultEditorTypes(java.lang.Object disp)
Deprecated. 
Trys to load default Editor s for specified displayer. Following things tries to do in specified orther to find editors: Latter found editors replaces existing editors in returned Map.

Parameters:
disp - a displayer for witch editors are to be created
Returns:
new java.util.Map with editor types

addEditors

public void addEditors(java.util.Map<java.lang.String,java.lang.Class> newEditorTypes)
Deprecated. 
Adds map with editors to this customizer, overrides existing editors with same aspect. Map must contain pairs key/value, where key is aspect name and value is Class of editor.

Parameters:
newEditorTypes - to be added

getDisplayer

public javax.swing.JComponent getDisplayer()
Deprecated. 
Gets the dsiplayer component to be customized by this customizer.

Returns:
dispalyer being customized

setDisplayer

public void setDisplayer(javax.swing.JComponent component)
Deprecated. 
Sets the displayer component to be customized

Parameters:
component - to be customized

getAspectPanel

public javax.swing.JPanel getAspectPanel()
Deprecated. 

getAspectTree

public javax.swing.JTree getAspectTree()
Deprecated. 


Copyright © 2010. All Rights Reserved.