|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel com.cosylab.gui.components.customizer.Customizer
public class Customizer
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.
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 |
---|
public Customizer()
public Customizer(SimpleDisplayer disp)
com.cosylab.gui.components.SimpleDisplayer
.
disp
- the displayer to be customized.public Customizer(javax.swing.JComponent disp, java.util.Map<java.lang.String,java.lang.Class> editorTypes)
disp
- the component to be customized.editorTypes
- mappings of available aspects and coresponding editor
typesMethod Detail |
---|
public Editor getEditor(java.lang.String aspect) throws java.lang.InstantiationException, java.lang.IllegalAccessException
aspect
- an aspect
java.lang.InstantiationException
- if instantiation fails
java.lang.IllegalAccessException
- if instantiation failspublic Editor getEditor(java.lang.Class type) throws java.lang.InstantiationException, java.lang.IllegalAccessException
type
- Class
of the editor
java.lang.InstantiationException
- if instantiation fails
java.lang.IllegalAccessException
- if instantiation failspublic boolean containsEditor(java.lang.String aspect)
aspect
-
true
if the customizer contains an editor type
asociated with the aspect and false
otherwisepublic javax.swing.JDialog showDialog(java.awt.Component c)
Shows customizer dialog centered around specified component.
Dialog title is composed from customiser name. Initial size is set to the size of customiser.
c
- a component on which customizer dialog to be centered
javax.swing.JDialog
instance with customizerpublic javax.swing.JDialog showDialog()
Shows Customizer dialog centered around customized displayer.
Dialog title is composed from Customizer name. Initial size is set to the size of Customizer.
JDialog
instance with customizerpublic static Customizer loadDefaultCustomizer(javax.swing.JComponent disp)
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.
disp
- a displayer for witch customizer is to be created
public static java.util.Map<java.lang.String,java.lang.Class> loadDefaultEditorTypes(java.lang.Object disp)
Editor
s for specified displayer.
Following things tries to do in specified orther to find editors:
String
s "ASPECTS" as static field, than this editor si
added to the customiser with all the listed aspects.
com.cosylab.gui.components.SimpleDisplayer
, editors are
taken from this interface.
disp
- a displayer for witch editors are to be created
java.util.Map
with editor typespublic void addEditors(java.util.Map<java.lang.String,java.lang.Class> newEditorTypes)
Class
of editor.
newEditorTypes
- to be addedpublic javax.swing.JComponent getDisplayer()
public void setDisplayer(javax.swing.JComponent component)
component
- to be customizedpublic javax.swing.JPanel getAspectPanel()
public javax.swing.JTree getAspectTree()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |