org.globus.cog.gridface.impl.desktop.icons
Class AbstractIcon

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JLabel
                  extended byorg.globus.cog.gridface.impl.desktop.icons.AbstractIcon
All Implemented Interfaces:
AccessActionProxy, AccessDesktop, Accessible, AccessIconProperties, AccessImageOverlay, AccessPopup, AccessPreferences, AccessPropertiesPanel, ActionProxy, CanImportActionProxy, Comparable, DesktopIcon, ExecutesLaunch, ImageObserver, ImportDataActionProxy, MenuContainer, MouseActionProxy, Serializable, SwingConstants
Direct Known Subclasses:
GenericIconImpl, GridIconImpl

public abstract class AbstractIcon
extends JLabel
implements DesktopIcon, AccessImageOverlay, CanImportActionProxy, MouseActionProxy, ImportDataActionProxy, Comparable

To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JLabel
JLabel.AccessibleJLabel
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  String appClass
          Application Container Class associated for this icon
protected  ObjectPair appClassArgs
          Application Container Class constructor arguments
protected  CoGTop desktop
          Desktop
protected  ImageIcon icon
          image of icon
protected  AttributesHolder iconAttributes
          Icon attributes used to edit in icon properties form
protected  String iconImageURI
          image URI location
protected  String iconType
          Icon type, default is NATIVE
protected  int id
          icon unique ID
protected static int id_counter
          icon ID static counter
protected  String launchStaticMain
          Application should be launched using static main method.
protected  ImageIcon origIconBackup
          Original image icon backup
protected  List overlays
          icon overlays
protected  JPopupMenu popupMenu
          DesktopIcon JPopupMenu
protected  DesktopInternalFrameImpl propertiesFrame
          Icon properties frame
protected  FormPanelSet propertiesPanelSet
          Panel used to populate icon properties form
protected  boolean selected
          is the icon selected
protected  ImageIcon selectedIcon
          darkened image of selected icon
 int xPressLoc
          x axis location where mouse was pressed
 int yPressLoc
          y axis location where mouse was pressed
 
Fields inherited from class javax.swing.JLabel
labelFor
 
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.globus.cog.gridface.impl.desktop.interfaces.DesktopIcon
DEFAULT_LOCATION, ICONTEXT_HEIGHT, ICONTEXT_WIDTH, NATIVEURI, sDELETEICON, sNEWICON, sPROPERTIES
 
Fields inherited from interface org.globus.cog.gridface.impl.desktop.interfaces.AccessPropertiesPanel
sCancel_button, sOK_button
 
Fields inherited from interface org.globus.cog.gridface.impl.desktop.interfaces.AccessPreferences
NO_TOSTRING, SUFFIX_TAG
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AbstractIcon(String applicationClass, ObjectPair arguments, String text, String iconType, String iconImageURI)
           
 
Method Summary
 void addOverlay(String overlayName, boolean instantUpdate)
           
 boolean addPopupMenuItem(JMenuItem newMenuItem)
           
 boolean canImportToComponent(JComponent dropComponent, DesktopIconGroup iconGroup)
           
 int compareTo(Object o)
           
 void configurePopup(JPopupMenu popup)
           
 void doOverlay()
           
 String getAppClass()
           
 String getAppClassArgs()
           
 ObjectPair getAppClassArgsObject()
           
 AttributesHolder getAttributesHolder()
           
 CanImportActionProxy getCanImportActionProxy()
           
 String getDefaultIconImageURI()
           
 String getDefaultIconText()
           
 CoGTop getDesktop()
           
 Dimension getDimension()
           
 String getIconImageURI()
           
 String getIconText()
           
 String getIconType()
           
 int getId()
           
 ImportDataActionProxy getImportDataActionProxy()
           
 MouseActionProxy getMouseActionProxy()
           
 JPopupMenu getPopup()
           
 JInternalFrame getPropertiesFrame()
           
 JComponent getPropertiesPanel()
           
 String getUseMainMethod()
           
 boolean importDataToComponent(JComponent dropComponent, Transferable t, JComponent dragComponent, Point dragPoint, Point dropPoint)
           
 boolean isSelected()
           
 void launch()
           
 void loadPreferences(Preferences iconNode)
           
 void mouseClicked(Object source, int clickCount, boolean isLeftMouseClick, int xLoc, int yLoc)
           
 void processPropertiesCancelButton()
           
 void processPropertiesOKButton()
           
 void remove()
           
 void removeAllOverlays()
           
 void removeOverlay(String overlayName)
           
 void savePreferences(Preferences iconNode)
           
 void setAppClass(String myAppClass)
           
 void setAppClassArgs(String args)
           
 void setAppClassArgsObject(ObjectPair args)
           
 void setDesktop(CoGTop myDesktop)
           
 void setIconImage(ImageIcon iconImage)
           
 void setIconImageURI(String imageURI)
           
 void setIconText(String text)
           
 void setIconType(String iconType)
           
 void setLocation(int x, int y)
           
 void setPopup(JPopupMenu desktopPopup)
           
 void setSelected(boolean selection)
           
 void setUseMainMethod(String sBoolean)
           
 void showIconProperties()
           
 void showPopupAt(int xLoc, int yLoc)
           
 
Methods inherited from class javax.swing.JLabel
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, 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, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, 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
 
Methods inherited from interface org.globus.cog.gridface.impl.desktop.interfaces.DesktopIcon
canImportTypePair
 

Field Detail

desktop

protected CoGTop desktop
Desktop


popupMenu

protected JPopupMenu popupMenu
DesktopIcon JPopupMenu


origIconBackup

protected ImageIcon origIconBackup
Original image icon backup


icon

protected ImageIcon icon
image of icon


iconImageURI

protected String iconImageURI
image URI location


selectedIcon

protected ImageIcon selectedIcon
darkened image of selected icon


overlays

protected List overlays
icon overlays


iconAttributes

protected AttributesHolder iconAttributes
Icon attributes used to edit in icon properties form


iconType

protected String iconType
Icon type, default is NATIVE


appClass

protected String appClass
Application Container Class associated for this icon


appClassArgs

protected ObjectPair appClassArgs
Application Container Class constructor arguments


launchStaticMain

protected String launchStaticMain
Application should be launched using static main method. Is a String instead of boolean for easy access through the Abstract Form Panel framework


id

protected int id
icon unique ID


id_counter

protected static int id_counter
icon ID static counter


selected

protected boolean selected
is the icon selected


xPressLoc

public int xPressLoc
x axis location where mouse was pressed


yPressLoc

public int yPressLoc
y axis location where mouse was pressed


propertiesFrame

protected DesktopInternalFrameImpl propertiesFrame
Icon properties frame


propertiesPanelSet

protected FormPanelSet propertiesPanelSet
Panel used to populate icon properties form

Constructor Detail

AbstractIcon

public AbstractIcon(String applicationClass,
                    ObjectPair arguments,
                    String text,
                    String iconType,
                    String iconImageURI)
             throws Exception
Method Detail

remove

public final void remove()
Specified by:
remove in interface AccessIconProperties

launch

public void launch()
Specified by:
launch in interface ExecutesLaunch

getIconType

public final String getIconType()
Specified by:
getIconType in interface AccessIconProperties

getIconImageURI

public final String getIconImageURI()
Specified by:
getIconImageURI in interface AccessIconProperties

getDefaultIconImageURI

public String getDefaultIconImageURI()
Specified by:
getDefaultIconImageURI in interface AccessIconProperties

setIconImageURI

public final void setIconImageURI(String imageURI)
Specified by:
setIconImageURI in interface AccessIconProperties

setIconImage

public final void setIconImage(ImageIcon iconImage)
Specified by:
setIconImage in interface AccessIconProperties

addOverlay

public final void addOverlay(String overlayName,
                             boolean instantUpdate)
Specified by:
addOverlay in interface AccessImageOverlay

removeAllOverlays

public final void removeAllOverlays()
Specified by:
removeAllOverlays in interface AccessImageOverlay

removeOverlay

public final void removeOverlay(String overlayName)
Specified by:
removeOverlay in interface AccessImageOverlay

doOverlay

public final void doOverlay()
Specified by:
doOverlay in interface AccessImageOverlay

getDefaultIconText

public String getDefaultIconText()
Specified by:
getDefaultIconText in interface AccessIconProperties

setIconText

public final void setIconText(String text)
Specified by:
setIconText in interface AccessIconProperties

getIconText

public String getIconText()
Specified by:
getIconText in interface AccessIconProperties

setIconType

public final void setIconType(String iconType)
Specified by:
setIconType in interface AccessIconProperties

getDimension

public final Dimension getDimension()
Specified by:
getDimension in interface AccessIconProperties

isSelected

public final boolean isSelected()
Specified by:
isSelected in interface AccessIconProperties

setSelected

public final void setSelected(boolean selection)
Specified by:
setSelected in interface AccessIconProperties

getId

public final int getId()
Specified by:
getId in interface AccessIconProperties

getPopup

public final JPopupMenu getPopup()
Specified by:
getPopup in interface AccessPopup

setPopup

public final void setPopup(JPopupMenu desktopPopup)
Specified by:
setPopup in interface AccessPopup

addPopupMenuItem

public final boolean addPopupMenuItem(JMenuItem newMenuItem)
Specified by:
addPopupMenuItem in interface AccessPopup

configurePopup

public void configurePopup(JPopupMenu popup)
Specified by:
configurePopup in interface AccessPopup

showPopupAt

public final void showPopupAt(int xLoc,
                              int yLoc)
Specified by:
showPopupAt in interface AccessPopup

setDesktop

public final void setDesktop(CoGTop myDesktop)
Specified by:
setDesktop in interface AccessDesktop

getDesktop

public final CoGTop getDesktop()
Specified by:
getDesktop in interface AccessDesktop

getAppClass

public final String getAppClass()
Specified by:
getAppClass in interface AccessIconProperties

setAppClass

public final void setAppClass(String myAppClass)
Specified by:
setAppClass in interface AccessIconProperties

getAppClassArgsObject

public final ObjectPair getAppClassArgsObject()
Specified by:
getAppClassArgsObject in interface AccessIconProperties

getAppClassArgs

public final String getAppClassArgs()
Specified by:
getAppClassArgs in interface AccessIconProperties

setAppClassArgs

public final void setAppClassArgs(String args)
Specified by:
setAppClassArgs in interface AccessIconProperties

setAppClassArgsObject

public final void setAppClassArgsObject(ObjectPair args)
Specified by:
setAppClassArgsObject in interface AccessIconProperties

getAttributesHolder

public AttributesHolder getAttributesHolder()
Specified by:
getAttributesHolder in interface DesktopIcon

getUseMainMethod

public String getUseMainMethod()
Specified by:
getUseMainMethod in interface AccessIconProperties

setUseMainMethod

public void setUseMainMethod(String sBoolean)
Specified by:
setUseMainMethod in interface AccessIconProperties

getCanImportActionProxy

public final CanImportActionProxy getCanImportActionProxy()
Specified by:
getCanImportActionProxy in interface AccessActionProxy
Returns:
Returns the canImportActionProxy.

getImportDataActionProxy

public final ImportDataActionProxy getImportDataActionProxy()
Specified by:
getImportDataActionProxy in interface AccessActionProxy
Returns:
Returns the importDataActionProxy.

getMouseActionProxy

public final MouseActionProxy getMouseActionProxy()
Specified by:
getMouseActionProxy in interface AccessActionProxy
Returns:
Returns the mouseActionProxy.

savePreferences

public void savePreferences(Preferences iconNode)
Specified by:
savePreferences in interface AccessPreferences

loadPreferences

public void loadPreferences(Preferences iconNode)
Specified by:
loadPreferences in interface AccessPreferences

getPropertiesPanel

public JComponent getPropertiesPanel()
Specified by:
getPropertiesPanel in interface AccessPropertiesPanel

processPropertiesOKButton

public final void processPropertiesOKButton()
Specified by:
processPropertiesOKButton in interface AccessPropertiesPanel

processPropertiesCancelButton

public final void processPropertiesCancelButton()
Specified by:
processPropertiesCancelButton in interface AccessPropertiesPanel

canImportToComponent

public boolean canImportToComponent(JComponent dropComponent,
                                    DesktopIconGroup iconGroup)
Specified by:
canImportToComponent in interface CanImportActionProxy

mouseClicked

public void mouseClicked(Object source,
                         int clickCount,
                         boolean isLeftMouseClick,
                         int xLoc,
                         int yLoc)
Specified by:
mouseClicked in interface MouseActionProxy

importDataToComponent

public boolean importDataToComponent(JComponent dropComponent,
                                     Transferable t,
                                     JComponent dragComponent,
                                     Point dragPoint,
                                     Point dropPoint)
Specified by:
importDataToComponent in interface ImportDataActionProxy

getPropertiesFrame

public final JInternalFrame getPropertiesFrame()
Specified by:
getPropertiesFrame in interface AccessPropertiesPanel

showIconProperties

public void showIconProperties()
Specified by:
showIconProperties in interface AccessPropertiesPanel

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable

setLocation

public void setLocation(int x,
                        int y)