org.ocd.desktop
Class TileSet

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--org.ocd.dcf.DCComponent
                                |
                                +--org.ocd.desktop.TileSet
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.awt.event.ContainerListener, java.util.EventListener, java.awt.image.ImageObserver, IXMLPersistable, java.awt.MenuContainer, java.io.Serializable

public class TileSet
extends DCComponent
implements java.awt.event.ContainerListener, java.awt.event.ActionListener

<< License Info Goes HERE >> All Rights Reserved. Draggable Description:

Since:
$Date: 2002/06/12 03:58:04 $
Version:
$Revision: 1.11 $
Author:
$Author: drichan $
See Also:
Serialized Form

Inner classes inherited from class org.ocd.dcf.DCComponent
DCComponent.DesktopWindow
 
Inner classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
protected  boolean closeable_flag
           
protected  boolean closed_flag
           
protected  ICompFactory componentFactory
           
protected  DCContainer container
           
protected  javax.swing.JMenuItem deleteMI
           
protected  DCDropTarget dropTarget
           
static int EAST
           
protected  DCTile myTile
           
static java.lang.String NO_TILE_IMG
           
static java.lang.String NODE_CLOSABLE_ATTR
           
static java.lang.String NODE_CLOSED_ATTR
           
static java.lang.String NODE_DESCRIPTION_ATTR
           
static java.lang.String NODE_NAME
           
static java.lang.String NODE_NAME_ATTR
           
static java.lang.String NODE_ORIENTATION_ATTR
           
static java.lang.String NODE_SHOW_TILE_ATTR
           
static int NORTH
           
protected  javax.swing.ImageIcon noTileImage
           
static java.lang.String OPEN_DOWN_IMG
           
static java.lang.String OPEN_LEFT_IMG
           
static java.lang.String OPEN_RIGHT_IMG
           
static java.lang.String OPEN_UP_IMG
           
protected  javax.swing.ImageIcon openDownImage
           
protected  javax.swing.ImageIcon openLeftImage
           
protected  javax.swing.ImageIcon openRightImage
           
protected  javax.swing.ImageIcon openUpImage
           
protected  int orientation
           
protected  DCPopupMenu popupMenu
           
protected  javax.swing.JMenuItem propertiesMI
           
protected  boolean showTileIcon_flag
           
protected static int SIDE_WIDTH
           
static int SOUTH
           
protected  org.ocd.desktop.TileSet.TilePanel tilePanel
           
static java.lang.String TILESET_ICON_IMG
           
protected  javax.swing.ImageIcon tileSetIconImage
           
static int WEST
           
 
Fields inherited from class org.ocd.dcf.DCComponent
dcComponentListeners, desktopFrame, draggable_flag, dragRecognizer, dragSource, dragSourceListener, extensionHREF, extensionName, extensionVersion, onDesktop_flag, relativeURL, transferObject, visible_flag, window, xmlChanged_flag, xmlParser
 
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 org.ocd.blx.IXMLPersistable
BLX_CLASS_NAME_ATTR, BLX_COMP_HEIGHT_ATTR, BLX_COMP_ID, BLX_COMP_NODE_NAME, BLX_COMP_WIDTH_ATTR, BLX_COMP_X_ATTR, BLX_COMP_Y_ATTR, BLX_DOCUMENT_NAME, BLX_EXT_HREF_ATTR, BLX_EXT_VERSION_ATTR, BLX_EXTENSION_ATTR, BLX_FACTORY_NODE_NAME, BLX_FACTORY_TYPE_ATTR, BLX_HREF_ATTR, BLX_NS, BLX_OBJ_NODE_NAME, COMP_TYPE, COMPONENT_FACTORY_TYPE, COMPONENT_FACTORY_TYPE_STR, FACTORY_TYPE, FILE_EXT, OBJECT_FACTORY_TYPE, OBJECT_FACTORY_TYPE_STR, OBJECT_TYPE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TileSet()
          Create a TileSet
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
          Actions for Menu
 void addDockedTile(DCTile pTile, int pIndex)
          Add a Tile to this TileSet
 void componentAdded(java.awt.event.ContainerEvent e)
          Invoked when a component has been added to the container.
 void componentRemoved(java.awt.event.ContainerEvent e)
          Invoked when a component has been removed from the container.
 java.lang.String getDescription()
          Get the Description
 java.lang.String getName()
          Get the Name of the Tile Set
 int getOrientation()
          Get the Orientation of the TileSet NORTH, SOUTH, EAST, WEST
protected  java.lang.String getOrientationAsString()
          Get the Orientation of the TileSet as a String NORTH_STR, SOUTH_STR, EAST_STR, WEST_STR
 java.awt.Dimension getPreferredSize()
          Get the Preferred Size of the TileSet
 boolean getShowTileSetIcon()
           
 org.w3c.dom.Element getXMLElement()
          This is the Data of the TileSet.
 boolean isClosable()
          Returns true if the TileSet can be closed false otherwise
 boolean isClosed()
          Is the TileSet Closed
 void paintComponent(java.awt.Graphics pGraphics)
          Paint
 void removeDockedTile(DCTile pTile)
          Remove a Tile from this TileSet
 void setBLXElement(org.w3c.dom.Element pElement, java.net.URL pRelativeURL)
          Set the Node on this Component
 void setClosable(boolean c)
          Set the TileSet to be Closable If true then the TileSet will have a control that The user can use to close and Open the TileSet
 void setClosed(boolean pClosed)
          Close or Open the TileSet
 void setDescription(java.lang.String desc)
          Set the Description of the TileSet
 void setName(java.lang.String title)
          Set the Name of the TileSet
 void setOrientation(int pOrientation)
          Set the Orientation
protected  void setOrientationAsString(java.lang.String pStr)
          Get the Orientation of the TileSet as a String NORTH_STR, SOUTH_STR, EAST_STR, WEST_STR
 void setShowTileSetIcon(boolean pShow)
           
 
Methods inherited from class org.ocd.dcf.DCComponent
addDCComponentListener, addDesktopFrameListener, appendChild, createDOMDocument, dispose, getBLXElement, getComponentDragImage, getDesktopFrame, getID, getLocation, getOwnerFrame, getTransferable, isDraggable, isOnDesktop, placeOnDesktop, removeDCComponentListener, removeDesktopFrameListener, removeFromDesktop, setDesktopFrameIconImage, setDesktopFrameTitle, setDesktopFrameVisible, setDraggable, setDragSourceListener, setLocation, setOnDesktop, setSize, setTransferable, setVisible, setXMLChanged, xmlHasChanged
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUIClassID, paramString, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocationOnScreen, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NODE_NAME

public static final java.lang.String NODE_NAME

NODE_ORIENTATION_ATTR

public static final java.lang.String NODE_ORIENTATION_ATTR

NODE_SHOW_TILE_ATTR

public static final java.lang.String NODE_SHOW_TILE_ATTR

NODE_CLOSABLE_ATTR

public static final java.lang.String NODE_CLOSABLE_ATTR

NODE_CLOSED_ATTR

public static final java.lang.String NODE_CLOSED_ATTR

NODE_NAME_ATTR

public static final java.lang.String NODE_NAME_ATTR

NODE_DESCRIPTION_ATTR

public static final java.lang.String NODE_DESCRIPTION_ATTR

NORTH

public static final int NORTH

EAST

public static final int EAST

SOUTH

public static final int SOUTH

WEST

public static final int WEST

closed_flag

protected boolean closed_flag

showTileIcon_flag

protected boolean showTileIcon_flag

closeable_flag

protected boolean closeable_flag

orientation

protected int orientation

SIDE_WIDTH

protected static final int SIDE_WIDTH

OPEN_LEFT_IMG

public static final java.lang.String OPEN_LEFT_IMG

OPEN_RIGHT_IMG

public static final java.lang.String OPEN_RIGHT_IMG

OPEN_UP_IMG

public static final java.lang.String OPEN_UP_IMG

OPEN_DOWN_IMG

public static final java.lang.String OPEN_DOWN_IMG

TILESET_ICON_IMG

public static final java.lang.String TILESET_ICON_IMG

NO_TILE_IMG

public static final java.lang.String NO_TILE_IMG

openLeftImage

protected javax.swing.ImageIcon openLeftImage

openRightImage

protected javax.swing.ImageIcon openRightImage

openUpImage

protected javax.swing.ImageIcon openUpImage

openDownImage

protected javax.swing.ImageIcon openDownImage

tileSetIconImage

protected javax.swing.ImageIcon tileSetIconImage

noTileImage

protected javax.swing.ImageIcon noTileImage

myTile

protected DCTile myTile

tilePanel

protected org.ocd.desktop.TileSet.TilePanel tilePanel

container

protected DCContainer container

dropTarget

protected DCDropTarget dropTarget

componentFactory

protected ICompFactory componentFactory

popupMenu

protected DCPopupMenu popupMenu

propertiesMI

protected javax.swing.JMenuItem propertiesMI

deleteMI

protected javax.swing.JMenuItem deleteMI
Constructor Detail

TileSet

public TileSet()
Create a TileSet
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Actions for Menu
Specified by:
actionPerformed in interface java.awt.event.ActionListener

setClosable

public void setClosable(boolean c)
Set the TileSet to be Closable If true then the TileSet will have a control that The user can use to close and Open the TileSet
Parameters:
boolean - true to Close/Open the TileSet false if the Set is always Open

isClosable

public boolean isClosable()
Returns true if the TileSet can be closed false otherwise
Returns:
boolean

setName

public void setName(java.lang.String title)
Set the Name of the TileSet
Overrides:
setName in class java.awt.Component

setDescription

public void setDescription(java.lang.String desc)
Set the Description of the TileSet

getDescription

public java.lang.String getDescription()
Get the Description

getName

public java.lang.String getName()
Get the Name of the Tile Set
Overrides:
getName in class java.awt.Component

setShowTileSetIcon

public void setShowTileSetIcon(boolean pShow)

getShowTileSetIcon

public boolean getShowTileSetIcon()

getPreferredSize

public java.awt.Dimension getPreferredSize()
Get the Preferred Size of the TileSet
Overrides:
getPreferredSize in class javax.swing.JComponent
Returns:
Dimension

setOrientation

public void setOrientation(int pOrientation)
Set the Orientation
Parameters:
pOrientation - where NORTH = Up, SOUTH = Down, EAST = Opens to Right, WEST = Open to Left

getOrientation

public int getOrientation()
Get the Orientation of the TileSet NORTH, SOUTH, EAST, WEST

getOrientationAsString

protected java.lang.String getOrientationAsString()
Get the Orientation of the TileSet as a String NORTH_STR, SOUTH_STR, EAST_STR, WEST_STR

setOrientationAsString

protected void setOrientationAsString(java.lang.String pStr)
Get the Orientation of the TileSet as a String NORTH_STR, SOUTH_STR, EAST_STR, WEST_STR

isClosed

public boolean isClosed()
Is the TileSet Closed

setClosed

public void setClosed(boolean pClosed)
Close or Open the TileSet

paintComponent

public void paintComponent(java.awt.Graphics pGraphics)
Paint
Overrides:
paintComponent in class javax.swing.JComponent

addDockedTile

public void addDockedTile(DCTile pTile,
                          int pIndex)
Add a Tile to this TileSet
Parameters:
pTile - to Add
pIndex - where to add it in the List

removeDockedTile

public void removeDockedTile(DCTile pTile)
Remove a Tile from this TileSet
Parameters:
pTile - to remove

setBLXElement

public void setBLXElement(org.w3c.dom.Element pElement,
                          java.net.URL pRelativeURL)
Set the Node on this Component
Overrides:
setBLXElement in class DCComponent
Parameters:
pElement - Node that contains this components settings
pRelativeURL - the URL that all HREFs would be relative to

getXMLElement

public org.w3c.dom.Element getXMLElement()
This is the Data of the TileSet.
Overrides:
getXMLElement in class DCComponent
Following copied from class: org.ocd.dcf.DCComponent
Returns:
the Node that contains this Components Settings

componentAdded

public void componentAdded(java.awt.event.ContainerEvent e)
Invoked when a component has been added to the container.
Specified by:
componentAdded in interface java.awt.event.ContainerListener

componentRemoved

public void componentRemoved(java.awt.event.ContainerEvent e)
Invoked when a component has been removed from the container.
Specified by:
componentRemoved in interface java.awt.event.ContainerListener