com.mindfusion.diagramming
Class LayerListView

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.mindfusion.diagramming.LayerListView
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class LayerListView
extends javax.swing.JPanel

Provides user interface for changing layer attributes.

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
LayerListView()
          Initializes a new instance of the LayerListView class.
 
Method Summary
 void addLayerListViewListener(LayerListViewListener listener)
          Registers listener so that it will receive events when users select, add or remove layers from the list.
 java.lang.String getActiveButtonTooltip()
          Gets the tooltip for the 'Active Layer' button in each item.
 java.lang.String getAddLayerButtonTooltip()
          Gets the tooltip for the 'Add Layer' button.
 boolean getAllowTitleEdit()
          Gets a value indicating whether layer titles can be in-place edited.
 Diagram getDiagram()
          Gets the diagram this control is associated with.
 boolean getDisplayText()
          Gets a value indicating whether to paint the text of items in the overview.
 java.util.List<java.awt.Image> getImages()
          Gets the image list used to draw icons for visibility and lock status.
 java.awt.Color getItemColor()
          Gets the color with which items' background is painted.
 int getItemHeight()
          Gets the height of the list items.
 com.mindfusion.common.ExtendedArrayList<LayerListViewItem> getItems()
          Gets a list of layer items shown in this control.
 java.lang.String getLockedButtonTooltip()
          Gets the tooltip for the 'Locked' button in each item.
 int getOverviewWidth()
          Gets the width of the layer overview.
 java.lang.String getRemoveLayerButtonTooltip()
          Gets the tooltip for the 'Remove Layer' button.
 java.awt.Color getSelectedColor()
          Gets the color with which selected items' background is painted.
 boolean getShowTooltips()
          Gets a value indicating whether to display tooltips.
 java.lang.String getVisibleButtonTooltip()
          Gets the tooltip for the 'Visible' button in each item.
 void removeLayerListViewListener(LayerListViewListener listener)
          Unregisters listener so that it will no longer receive LayerListView events.
 void setActiveButtonTooltip(java.lang.String value)
          Sets the tooltip for the 'Active Layer' button in each item.
 void setAddLayerButtonTooltip(java.lang.String value)
          Sets the tooltip for the 'Add Layer' button.
 void setAllowTitleEdit(boolean value)
          Sets a value indicating whether layer titles can be in-place edited.
 void setDiagram(Diagram value)
          Sets the diagram this control is associated with.
 void setDisplayText(boolean value)
          Sets a value indicating whether to paint the text of items in the overview.
 void setImages(java.util.List<java.awt.Image> value)
          Gets the image list used to draw icons for visibility and lock status.
 void setItemColor(java.awt.Color value)
          Sets the color with which items' background is painted.
 void setItemHeight(int value)
          Sets the height of the items.
 void setLockedButtonTooltip(java.lang.String value)
          Sets the tooltip for the 'Locked' button in each item.
 void setOverviewWidth(int value)
          Sets the width of the layer overview.
 void setRemoveLayerButtonTooltip(java.lang.String value)
          Sets the tooltip for the 'Remove Layer' button.
 void setSelectedColor(java.awt.Color value)
          Sets the color with which selected items' background is painted.
 void setShowTooltips(boolean value)
          Sets a value indicating whether to display tooltips.
 void setVisibleButtonTooltip(java.lang.String value)
          Gets the tooltip for the 'Visible' button in each item.
 
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

LayerListView

public LayerListView()
Initializes a new instance of the LayerListView class.

Method Detail

getDiagram

public Diagram getDiagram()
Gets the diagram this control is associated with.

Returns:
A Diagram instance.

setDiagram

public void setDiagram(Diagram value)
Sets the diagram this control is associated with.

Parameters:
value - A Diagram instance.

getItems

public com.mindfusion.common.ExtendedArrayList<LayerListViewItem> getItems()
Gets a list of layer items shown in this control.


getItemHeight

public int getItemHeight()
Gets the height of the list items.

Returns:
An integer value specifying the items height.

setItemHeight

public void setItemHeight(int value)
Sets the height of the items.

Parameters:
value - An integer value specifying the items height.

getOverviewWidth

public int getOverviewWidth()
Gets the width of the layer overview.

Returns:
An integer value specifying the width of the layers' overview area.

setOverviewWidth

public void setOverviewWidth(int value)
Sets the width of the layer overview.

Parameters:
value - An integer value specifying the width of the layers' overview area.

getSelectedColor

public java.awt.Color getSelectedColor()
Gets the color with which selected items' background is painted.

Returns:
The Color of selected items.

setSelectedColor

public void setSelectedColor(java.awt.Color value)
Sets the color with which selected items' background is painted.

Parameters:
value - The Color of selected items.

getItemColor

public java.awt.Color getItemColor()
Gets the color with which items' background is painted.

Returns:
The Color of items when not selected.

setItemColor

public void setItemColor(java.awt.Color value)
Sets the color with which items' background is painted.

Parameters:
value - The Color of items when not selected.

getImages

public java.util.List<java.awt.Image> getImages()
Gets the image list used to draw icons for visibility and lock status.

Returns:
A List of Image objects.

setImages

public void setImages(java.util.List<java.awt.Image> value)
Gets the image list used to draw icons for visibility and lock status.

Parameters:
value - A List of Image objects.

getDisplayText

public boolean getDisplayText()
Gets a value indicating whether to paint the text of items in the overview.

Returns:
true to display items' text, otherwise false.

setDisplayText

public void setDisplayText(boolean value)
Sets a value indicating whether to paint the text of items in the overview.

Parameters:
value - true to display items' text, otherwise false.

getAllowTitleEdit

public boolean getAllowTitleEdit()
Gets a value indicating whether layer titles can be in-place edited.

Returns:
true to allow editing the layers titles, otherwise false.

setAllowTitleEdit

public void setAllowTitleEdit(boolean value)
Sets a value indicating whether layer titles can be in-place edited.

Parameters:
value - true to allow editing the layers titles, otherwise false.

getShowTooltips

public boolean getShowTooltips()
Gets a value indicating whether to display tooltips.

Returns:
true to show tooltips, otherwise false.

setShowTooltips

public void setShowTooltips(boolean value)
Sets a value indicating whether to display tooltips.

Parameters:
value - true to show tooltips, otherwise false.

getAddLayerButtonTooltip

public java.lang.String getAddLayerButtonTooltip()
Gets the tooltip for the 'Add Layer' button.

Returns:
A String specifying the tooltip of the Add Layer button.

setAddLayerButtonTooltip

public void setAddLayerButtonTooltip(java.lang.String value)
Sets the tooltip for the 'Add Layer' button.

Parameters:
value - A String specifying the tooltip of the Add Layer button.

getRemoveLayerButtonTooltip

public java.lang.String getRemoveLayerButtonTooltip()
Gets the tooltip for the 'Remove Layer' button.

Returns:
A String specifying the tooltip of the Remove Layer button.

setRemoveLayerButtonTooltip

public void setRemoveLayerButtonTooltip(java.lang.String value)
Sets the tooltip for the 'Remove Layer' button.

Parameters:
value - A String specifying the tooltip of the Remove Layer button.

getActiveButtonTooltip

public java.lang.String getActiveButtonTooltip()
Gets the tooltip for the 'Active Layer' button in each item.

Returns:
A String specifying the tooltip of the Active Layer button.

setActiveButtonTooltip

public void setActiveButtonTooltip(java.lang.String value)
Sets the tooltip for the 'Active Layer' button in each item.

Parameters:
value - A String specifying the tooltip of the Active Layer button.

getVisibleButtonTooltip

public java.lang.String getVisibleButtonTooltip()
Gets the tooltip for the 'Visible' button in each item.

Returns:
A String specifying the tooltip of the Visible button.

setVisibleButtonTooltip

public void setVisibleButtonTooltip(java.lang.String value)
Gets the tooltip for the 'Visible' button in each item.

Parameters:
value - A String specifying the tooltip of the Visible button.

getLockedButtonTooltip

public java.lang.String getLockedButtonTooltip()
Gets the tooltip for the 'Locked' button in each item.

Returns:
A String specifying the tooltip of the Locked button.

setLockedButtonTooltip

public void setLockedButtonTooltip(java.lang.String value)
Sets the tooltip for the 'Locked' button in each item.

Parameters:
value - A String specifying the tooltip of the Locked button.

addLayerListViewListener

public void addLayerListViewListener(LayerListViewListener listener)
Registers listener so that it will receive events when users select, add or remove layers from the list.

Parameters:
listener - An object implementing the LayerListViewListener interface.

removeLayerListViewListener

public void removeLayerListViewListener(LayerListViewListener listener)
Unregisters listener so that it will no longer receive LayerListView events.

Parameters:
listener - An object implementing the LayerListViewListener interface.