com.irisel.oms.guiom.iframe
Class CLInternalFrame

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JInternalFrame
                  extended by com.irisel.oms.guiom.iframe.CLInternalFrame
All Implemented Interfaces:
OMSEventListener, OMSEventSource, Access, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.InternalFrameListener, javax.swing.RootPaneContainer, javax.swing.WindowConstants
Direct Known Subclasses:
AboutFrame, AddNoteIFrame, CLBasicInternalFrame, CLJInternalFrameNewInstance, CLJInternalFrameOpenInstance, CLJInternalFrameSelectInstances, CLWebBrowserIFrame, Console, ConsoleImpl, ControlPanel, DescriptionsPanel, SelectToolbarsInternalFrame

public abstract class CLInternalFrame
extends javax.swing.JInternalFrame
implements OMSEventSource, OMSEventListener, javax.swing.event.InternalFrameListener, java.beans.PropertyChangeListener, Access

Title: GUIOM Internal Frame Interface

Descripcion: Must be extended by any event-handler form

Copyright: Copyright (c) 2003

Empresa: Irisel

Version:
1.0
Author:
Jose Manuel Gomez Alvarez
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JInternalFrame
javax.swing.JInternalFrame.JDesktopIcon
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
 java.lang.String menuKey
          Key of the menu used to open a form.
 
Fields inherited from class javax.swing.JInternalFrame
CONTENT_PANE_PROPERTY, FRAME_ICON_PROPERTY, GLASS_PANE_PROPERTY, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, LAYERED_PANE_PROPERTY, MENU_BAR_PROPERTY, ROOT_PANE_PROPERTY, TITLE_PROPERTY
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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 com.irisel.oms.guiom.rbac.Access
NONE, READ_ONLY, READ_WRITE, WRITE_ONLY
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CLInternalFrame()
          Constructor.
CLInternalFrame(java.lang.Integer parentKey)
          Constructor.
 
Method Summary
 void addOMSEventListener(OMSEventListener listener)
           
static java.lang.String generateTypeKey(java.lang.Object[] args)
          Each subclass may determine the proper key by extending this method.
 java.lang.Integer getKey()
           
static CLInternalFrame getNewInstance()
           
 java.lang.Integer getParentKey()
           
 java.lang.String getTypeKey()
           
abstract  void init(java.awt.event.ActionEvent evt)
           
abstract  void init(OMSAction action)
           
 void internalFrameActivated(javax.swing.event.InternalFrameEvent e)
           
 void internalFrameClosed(javax.swing.event.InternalFrameEvent e)
           
 void internalFrameClosing(javax.swing.event.InternalFrameEvent e)
           
 void internalFrameDeactivated(javax.swing.event.InternalFrameEvent e)
           
 void internalFrameDeiconified(javax.swing.event.InternalFrameEvent e)
           
 void internalFrameIconified(javax.swing.event.InternalFrameEvent e)
           
 void internalFrameOpened(javax.swing.event.InternalFrameEvent e)
           
 java.lang.String onEvent(OMSEvent ev)
           
 void propertyChange(java.beans.PropertyChangeEvent evt)
           
 void refresh()
           
 void removeAllListeners()
           
 void send(OMSAction action)
          Equivalent to send (new OMSEvent(this,action))
 void send(OMSAction action, boolean locally)
          Equivalent to send (new OMSEvent(this,action),locally)
 void send(OMSEvent evt)
          Sends the event both local and globally.
 void send(OMSEvent evt, boolean locally)
          Sends an event through the local event source or the global event source, depending on the value of
 void setAccessMode(int mode)
          Override to implement security access
 void setKey(java.lang.Integer key)
           
 void setParentKey(java.lang.Integer parentKey)
           
 void setTypeKey(java.lang.String typeKey)
          This method stores the type key in the instance.
 
Methods inherited from class javax.swing.JInternalFrame
addInternalFrameListener, dispose, doDefaultCloseAction, getAccessibleContext, getContentPane, getDefaultCloseOperation, getDesktopIcon, getDesktopPane, getFocusCycleRootAncestor, getFocusOwner, getFrameIcon, getGlassPane, getInternalFrameListeners, getJMenuBar, getLastCursor, getLayer, getLayeredPane, getMenuBar, getMostRecentFocusOwner, getNormalBounds, getRootPane, getTitle, getUI, getUIClassID, getWarningString, hide, isClosable, isClosed, isFocusCycleRoot, isIcon, isIconifiable, isMaximizable, isMaximum, isResizable, isSelected, moveToBack, moveToFront, pack, remove, removeInternalFrameListener, reshape, restoreSubcomponentFocus, setClosable, setClosed, setContentPane, setCursor, setDefaultCloseOperation, setDesktopIcon, setFocusCycleRoot, setFrameIcon, setGlassPane, setIcon, setIconifiable, setJMenuBar, setLayer, setLayer, setLayeredPane, setLayout, setMaximizable, setMaximum, setMenuBar, setNormalBounds, setResizable, setSelected, setTitle, setUI, show, toBack, toFront, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, 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, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

menuKey

public java.lang.String menuKey
Key of the menu used to open a form. Used to avoid duplicate instances.

Constructor Detail

CLInternalFrame

public CLInternalFrame(java.lang.Integer parentKey)
Constructor. Initializes the form's key and parent key, and the event framework. The default close operation is set to JInternalFrame.DISPOSE_ON_CLOSE.

Parameters:
parentKey -

CLInternalFrame

public CLInternalFrame()
Constructor.

Method Detail

init

public abstract void init(OMSAction action)

init

public abstract void init(java.awt.event.ActionEvent evt)

send

public void send(OMSEvent evt)
          throws java.lang.Exception
Sends the event both local and globally.

Specified by:
send in interface OMSEventSource
Parameters:
evt - the event to be sent
Throws:
java.lang.Exception
See Also:
send(OMSEvent, boolean)

send

public void send(OMSEvent evt,
                 boolean locally)
          throws java.lang.Exception
Sends an event through the local event source or the global event source, depending on the value of
locally
. Local events will be sent to registered listeners, global events reach the UI Controller.

Parameters:
evt - the event to be sent
locally - controls the event source to be used.
Throws:
java.lang.Exception
See Also:
OMSEventSourceImpl

send

public void send(OMSAction action)
          throws java.lang.Exception
Equivalent to send (new OMSEvent(this,action))

Throws:
java.lang.Exception
See Also:
send(OMSEvent)

send

public void send(OMSAction action,
                 boolean locally)
          throws java.lang.Exception
Equivalent to send (new OMSEvent(this,action),locally)

Throws:
java.lang.Exception
See Also:
send(OMSEvent, boolean)

onEvent

public java.lang.String onEvent(OMSEvent ev)
Specified by:
onEvent in interface OMSEventListener

getKey

public java.lang.Integer getKey()

getParentKey

public java.lang.Integer getParentKey()

setParentKey

public void setParentKey(java.lang.Integer parentKey)

addOMSEventListener

public void addOMSEventListener(OMSEventListener listener)

removeAllListeners

public void removeAllListeners()

refresh

public void refresh()

getTypeKey

public java.lang.String getTypeKey()

setTypeKey

public void setTypeKey(java.lang.String typeKey)
This method stores the type key in the instance. The type key must be obtained through generateTypeKey();

Parameters:
typeKey -
See Also:
generateTypeKey(Object[])

generateTypeKey

public static java.lang.String generateTypeKey(java.lang.Object[] args)
Each subclass may determine the proper key by extending this method. The type key will be used by the platform to decide whether to create a new instance or to reuse an opened instance of this frame. For a Select frame, the business object name plus a keyword (Select-Account) could be used. On the contrary, a frame used to edit a business object should include a unique identifier of this object. Child frames should include the parent key in their type to distinguish themself from other form's children frames. This method is static to be able to obtain the key of a to-be-created instance before creating it.

Parameters:
args - args[0] action , args[1] classname, args[2..n]array of arguments specified to init()

getNewInstance

public static CLInternalFrame getNewInstance()

internalFrameOpened

public void internalFrameOpened(javax.swing.event.InternalFrameEvent e)
Specified by:
internalFrameOpened in interface javax.swing.event.InternalFrameListener

internalFrameClosing

public void internalFrameClosing(javax.swing.event.InternalFrameEvent e)
Specified by:
internalFrameClosing in interface javax.swing.event.InternalFrameListener

internalFrameClosed

public void internalFrameClosed(javax.swing.event.InternalFrameEvent e)
Specified by:
internalFrameClosed in interface javax.swing.event.InternalFrameListener

internalFrameIconified

public void internalFrameIconified(javax.swing.event.InternalFrameEvent e)
Specified by:
internalFrameIconified in interface javax.swing.event.InternalFrameListener

internalFrameDeiconified

public void internalFrameDeiconified(javax.swing.event.InternalFrameEvent e)
Specified by:
internalFrameDeiconified in interface javax.swing.event.InternalFrameListener

internalFrameActivated

public void internalFrameActivated(javax.swing.event.InternalFrameEvent e)
Specified by:
internalFrameActivated in interface javax.swing.event.InternalFrameListener

internalFrameDeactivated

public void internalFrameDeactivated(javax.swing.event.InternalFrameEvent e)
Specified by:
internalFrameDeactivated in interface javax.swing.event.InternalFrameListener

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

setKey

public void setKey(java.lang.Integer key)

setAccessMode

public void setAccessMode(int mode)
Override to implement security access

Specified by:
setAccessMode in interface Access
See Also:
Access