org.ocd.dcf
Class DCTile

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--org.ocd.dcf.DCComponent
                                |
                                +--org.ocd.dcf.DCTile
All Implemented Interfaces:
javax.accessibility.Accessible, java.lang.Cloneable, java.awt.image.ImageObserver, IXMLPersistable, java.awt.MenuContainer, java.io.Serializable

public class DCTile
extends DCComponent
implements java.lang.Cloneable, java.io.Serializable

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

Since:
$Date: 2002/08/07 02:58:33 $
Version:
$Revision: 1.16 $
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  javax.swing.Action action
           
protected  java.awt.Image backgroundImage
           
protected  javax.swing.ImageIcon busyIcon
          Icon used to show Tile is Busy
protected  boolean compute_titleFont_flag
           
protected static java.awt.datatransfer.DataFlavor dcTileDataFlavor
           
static java.lang.String DEFAULT_BKG
           
static java.lang.String DEFAULT_BUSY
          Resource used to show the Tile is Busy
static java.lang.String DEFAULT_ICON
           
static java.awt.Dimension DEFAULT_ICON_SIZE
           
protected  float default_shortTitle_Size
           
protected  java.awt.Font default_shortTitleFont
           
static java.awt.Dimension DEFAULT_TILE_SIZE
           
protected static javax.swing.ImageIcon defaultIcon
           
protected  javax.swing.JMenuItem deleteMI
           
static java.lang.String DESC_ATTR
           
protected  java.lang.String description
           
protected  javax.swing.Icon icon
           
protected  int iconX
           
protected  int iconY
           
protected  org.ocd.dcf.DCTile.MyMenuListener menuListener
           
static java.lang.String NAME_ATTR
           
static java.lang.String NODE_NAME
           
protected  javax.swing.JMenuItem propertiesMI
           
protected  java.lang.String shortTitle
           
protected  java.awt.Font shortTitleFont
           
protected  int shortTitleX
           
static java.lang.String SHOW_TITLE_ATTR
           
protected  boolean showBkgrd_flag
           
protected  boolean showBusy_flag
          Set to true when we are trying to perform the associated Action
protected  boolean showTitle_flag
           
static java.lang.String TILE_FLAVOR_NAME
           
static java.lang.String TILE_MIME_TYPE
           
protected  DCPopupMenu tileMenu
           
protected  java.lang.String title
           
static java.lang.String TITLE_ATTR
           
protected  org.ocd.dcf.DCTile.TitleComponent titleComp
           
 
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
DCTile()
          Create a Tile
DCTile(javax.swing.Icon pIcon, java.lang.String pShortTitle, java.lang.String pTitle, java.lang.String pDesc)
          Create a Tile
 
Method Summary
 java.lang.Object clone()
          Clone this Tile For the tile to be cloned the Action must also be able to clone
 void dispose()
          Dispose of this Tile
 javax.swing.Action getAction()
          Get the Action of the Tile
static java.awt.datatransfer.DataFlavor getDCTileDataFlavor()
          Return the DCTileDataFlavor
 java.lang.String getDescription()
          Get Description
 java.awt.Dimension getPreferredSize()
          Return the Preferred Size of this Tile
 java.lang.String getShortTitle()
          Get the Short Title
 boolean getShowBackground()
          Do we show the Background
 boolean getShowTitle()
          Show the Title
 java.lang.String getTitle()
          Get the Title
 org.w3c.dom.Element getXMLElement()
          Gets the XML Data for this Tile
 void hideBusy()
          Hide the Busy Icon
 void paintComponent(java.awt.Graphics pGraphics)
          Paint the Tile Component This method first paints the Background Image then the Icon and then the Title
protected  void processElement(org.w3c.dom.Element pElement)
          Process an Embedded Element
protected  void processProperties(XMLProperties pProperties)
          Process Properties from XML
 void setAction(javax.swing.Action pAction)
          Set the Action for the Tile
 void setBLXElement(org.w3c.dom.Element pElement, java.net.URL pRelativeURL)
          Set the Node on this Component
 void setDescription(java.lang.String pDesc)
          Set the Description of the Tile.
 void setIcon(javax.swing.Icon pIcon)
          Set the Icon for the Tile
 void setLocation(int x, int y)
          Set the Location of the Tile
 void setOnDesktop(boolean pBool)
          Set Tile on Desktop
 void setShortTitle(java.lang.String pTitle)
          Set the Short Title.
 void setShowBackground(boolean b)
          Show the Tile BackGround
 void setShowTitle(boolean pShowTitle)
          Show the Title
 void setTitle(java.lang.String pTitle)
          Set the Title of the Tile The Title displays in a seperate Window below the Tile
 void setVisible(boolean pVisible)
          Show or Hide the Tile
 void showBusy()
          Show the Busy Icon
protected  void updateTitleLocation()
          Update the Location of the Title based on the Tile Location
 
Methods inherited from class org.ocd.dcf.DCComponent
addDCComponentListener, addDesktopFrameListener, appendChild, createDOMDocument, getBLXElement, getComponentDragImage, getDesktopFrame, getID, getLocation, getOwnerFrame, getTransferable, isDraggable, isOnDesktop, placeOnDesktop, removeDCComponentListener, removeDesktopFrameListener, removeFromDesktop, setDesktopFrameIconImage, setDesktopFrameTitle, setDesktopFrameVisible, setDraggable, setDragSourceListener, setSize, setTransferable, 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, getName, 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, setName, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TILE_MIME_TYPE

public static final java.lang.String TILE_MIME_TYPE

TILE_FLAVOR_NAME

public static final java.lang.String TILE_FLAVOR_NAME

dcTileDataFlavor

protected static java.awt.datatransfer.DataFlavor dcTileDataFlavor

DEFAULT_TILE_SIZE

public static final java.awt.Dimension DEFAULT_TILE_SIZE

DEFAULT_ICON_SIZE

public static final java.awt.Dimension DEFAULT_ICON_SIZE

DEFAULT_BKG

public static final java.lang.String DEFAULT_BKG

DEFAULT_ICON

public static final java.lang.String DEFAULT_ICON

DEFAULT_BUSY

public static final java.lang.String DEFAULT_BUSY
Resource used to show the Tile is Busy

defaultIcon

protected static transient javax.swing.ImageIcon defaultIcon

busyIcon

protected transient javax.swing.ImageIcon busyIcon
Icon used to show Tile is Busy

default_shortTitle_Size

protected final float default_shortTitle_Size

default_shortTitleFont

protected final java.awt.Font default_shortTitleFont

SHOW_TITLE_ATTR

public static final java.lang.String SHOW_TITLE_ATTR

TITLE_ATTR

public static final java.lang.String TITLE_ATTR

NAME_ATTR

public static final java.lang.String NAME_ATTR

DESC_ATTR

public static final java.lang.String DESC_ATTR

NODE_NAME

public static final java.lang.String NODE_NAME

showTitle_flag

protected boolean showTitle_flag

showBkgrd_flag

protected boolean showBkgrd_flag

compute_titleFont_flag

protected transient boolean compute_titleFont_flag

backgroundImage

protected transient java.awt.Image backgroundImage

showBusy_flag

protected transient boolean showBusy_flag
Set to true when we are trying to perform the associated Action

icon

protected javax.swing.Icon icon

iconX

protected int iconX

iconY

protected int iconY

shortTitle

protected java.lang.String shortTitle

title

protected java.lang.String title

description

protected java.lang.String description

titleComp

protected transient org.ocd.dcf.DCTile.TitleComponent titleComp

action

protected javax.swing.Action action

shortTitleFont

protected transient java.awt.Font shortTitleFont

shortTitleX

protected transient int shortTitleX

tileMenu

protected transient DCPopupMenu tileMenu

menuListener

protected transient org.ocd.dcf.DCTile.MyMenuListener menuListener

propertiesMI

protected transient javax.swing.JMenuItem propertiesMI

deleteMI

protected transient javax.swing.JMenuItem deleteMI
Constructor Detail

DCTile

public DCTile()
Create a Tile

DCTile

public DCTile(javax.swing.Icon pIcon,
              java.lang.String pShortTitle,
              java.lang.String pTitle,
              java.lang.String pDesc)
Create a Tile
Parameters:
pIcon - Icon to Use for Tile
pShortTitle - short title for Tile
pTitle - Title for Tile
pDesc - Description of Tile
Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clone this Tile For the tile to be cloned the Action must also be able to clone
Overrides:
clone in class java.lang.Object

getDCTileDataFlavor

public static java.awt.datatransfer.DataFlavor getDCTileDataFlavor()
Return the DCTileDataFlavor
Returns:
DataFlavor

setIcon

public void setIcon(javax.swing.Icon pIcon)
Set the Icon for the Tile
Parameters:
pIcon - to use

setAction

public void setAction(javax.swing.Action pAction)
Set the Action for the Tile
Parameters:
pAction -  

getAction

public javax.swing.Action getAction()
Get the Action of the Tile
Returns:
Action

setLocation

public void setLocation(int x,
                        int y)
Set the Location of the Tile
Overrides:
setLocation in class DCComponent
Parameters:
x - location
y - location

updateTitleLocation

protected void updateTitleLocation()
Update the Location of the Title based on the Tile Location

getPreferredSize

public java.awt.Dimension getPreferredSize()
Return the Preferred Size of this Tile
Overrides:
getPreferredSize in class javax.swing.JComponent

setVisible

public void setVisible(boolean pVisible)
Show or Hide the Tile
Overrides:
setVisible in class DCComponent
Parameters:
pVisible -  

setOnDesktop

public void setOnDesktop(boolean pBool)
Set Tile on Desktop
Overrides:
setOnDesktop in class DCComponent
Parameters:
pBool -  

setShowTitle

public void setShowTitle(boolean pShowTitle)
Show the Title
Parameters:
pShowTitle -  

setShowBackground

public void setShowBackground(boolean b)
Show the Tile BackGround

getShowBackground

public boolean getShowBackground()
Do we show the Background

getShowTitle

public boolean getShowTitle()
Show the Title

setShortTitle

public void setShortTitle(java.lang.String pTitle)
Set the Short Title. The Short Title is displayed on the Tile itself
Parameters:
@pTitle -  

getShortTitle

public java.lang.String getShortTitle()
Get the Short Title
Returns:
Short Title

setTitle

public void setTitle(java.lang.String pTitle)
Set the Title of the Tile The Title displays in a seperate Window below the Tile
Parameters:
pTitle -  

getTitle

public java.lang.String getTitle()
Get the Title
Returns:
title

setDescription

public void setDescription(java.lang.String pDesc)
Set the Description of the Tile. The Description is used for the ToolTip
Parameters:
pDesc -  

getDescription

public java.lang.String getDescription()
Get Description
Returns:
Description

showBusy

public void showBusy()
Show the Busy Icon

hideBusy

public void hideBusy()
Hide the Busy Icon

paintComponent

public void paintComponent(java.awt.Graphics pGraphics)
Paint the Tile Component This method first paints the Background Image then the Icon and then the Title
Overrides:
paintComponent in class javax.swing.JComponent

dispose

public void dispose()
Dispose of this Tile
Overrides:
dispose in class DCComponent

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

processElement

protected void processElement(org.w3c.dom.Element pElement)
Process an Embedded Element

processProperties

protected void processProperties(XMLProperties pProperties)
Process Properties from XML
Parameters:
pProperties - Properties to Process

getXMLElement

public org.w3c.dom.Element getXMLElement()
Gets the XML Data for this Tile
Overrides:
getXMLElement in class DCComponent
Returns:
xml Element