edu.jhu.ece.iacl.jist.pipeline.gui
Class LayoutPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JLayeredPane
                  extended by javax.swing.JDesktopPane
                      extended by edu.jhu.ece.iacl.jist.pipeline.gui.LayoutPanel
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.InternalFrameListener

public class LayoutPanel
extends javax.swing.JDesktopPane
implements javax.swing.event.InternalFrameListener

Desktop pane for pipe layouts.

Author:
Blake Lucas
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JDesktopPane
javax.swing.JDesktopPane.AccessibleJDesktopPane
 
Nested classes/interfaces inherited from class javax.swing.JLayeredPane
javax.swing.JLayeredPane.AccessibleJLayeredPane
 
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
protected  java.util.LinkedList<PipeInternalFrame> frames
          The frames.
 
Fields inherited from class javax.swing.JDesktopPane
LIVE_DRAG_MODE, OUTLINE_DRAG_MODE
 
Fields inherited from class javax.swing.JLayeredPane
DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER
 
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
protected LayoutPanel()
          Default constructor.
 
Method Summary
 PipeInternalFrame addFrame(java.lang.String name)
          Add frame with particular name.
 void addLayoutFrame()
          Add internal frame to desktop layout.
 PipeInternalFrame getActiveFrame()
          Return currently selected frame.
 java.util.LinkedList<PipeInternalFrame> getFrames()
          Return active frames.
static LayoutPanel getInstance()
          Gets the single instance of LayoutPanel.
 java.util.LinkedList<PipeInternalFrame> getInternalFrames()
          Return all internal frames.
 PipeLayout getPipelineLayout()
          Get the layout for the current active frame.
 void internalFrameActivated(javax.swing.event.InternalFrameEvent arg0)
           
 void internalFrameClosed(javax.swing.event.InternalFrameEvent evt)
          Remove frame from list if frame is closed.
 void internalFrameClosing(javax.swing.event.InternalFrameEvent evt)
          Close frame if possible.
 void internalFrameDeactivated(javax.swing.event.InternalFrameEvent arg0)
           
 void internalFrameDeiconified(javax.swing.event.InternalFrameEvent arg0)
           
 void internalFrameIconified(javax.swing.event.InternalFrameEvent arg0)
           
 void internalFrameOpened(javax.swing.event.InternalFrameEvent arg0)
           
 void setPipelineLayout(PipeLayout layout, javax.swing.ProgressMonitor monitor)
          Set the layout for the current active frame.
 
Methods inherited from class javax.swing.JDesktopPane
addImpl, getAccessibleContext, getAllFrames, getAllFramesInLayer, getDesktopManager, getDragMode, getSelectedFrame, getUI, getUIClassID, paramString, remove, removeAll, selectFrame, setComponentZOrder, setDesktopManager, setDragMode, setSelectedFrame, setUI, updateUI
 
Methods inherited from class javax.swing.JLayeredPane
getComponentCountInLayer, getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, paint, putLayer, setLayer, setLayer, setPosition
 
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, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, 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, 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, removeContainerListener, 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
 

Field Detail

frames

protected java.util.LinkedList<PipeInternalFrame> frames
The frames.

Constructor Detail

LayoutPanel

protected LayoutPanel()
Default constructor.

Method Detail

getInstance

public static LayoutPanel getInstance()
Gets the single instance of LayoutPanel.

Returns:
single instance of LayoutPanel

addFrame

public PipeInternalFrame addFrame(java.lang.String name)
Add frame with particular name.

Parameters:
name - the name

addLayoutFrame

public void addLayoutFrame()
Add internal frame to desktop layout.


getActiveFrame

public PipeInternalFrame getActiveFrame()
Return currently selected frame.

Returns:
the active frame

getFrames

public java.util.LinkedList<PipeInternalFrame> getFrames()
Return active frames.

Returns:
the frames

getInternalFrames

public java.util.LinkedList<PipeInternalFrame> getInternalFrames()
Return all internal frames.

Returns:
the internal frames

getPipelineLayout

public PipeLayout getPipelineLayout()
Get the layout for the current active frame.

Returns:
the pipeline layout

internalFrameActivated

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

internalFrameClosed

public void internalFrameClosed(javax.swing.event.InternalFrameEvent evt)
Remove frame from list if frame is closed.

Specified by:
internalFrameClosed in interface javax.swing.event.InternalFrameListener
Parameters:
evt - the evt

internalFrameClosing

public void internalFrameClosing(javax.swing.event.InternalFrameEvent evt)
Close frame if possible.

Specified by:
internalFrameClosing in interface javax.swing.event.InternalFrameListener
Parameters:
evt - the evt

internalFrameDeactivated

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

internalFrameDeiconified

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

internalFrameIconified

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

internalFrameOpened

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

setPipelineLayout

public void setPipelineLayout(PipeLayout layout,
                              javax.swing.ProgressMonitor monitor)
Set the layout for the current active frame.

Parameters:
layout - the layout
monitor - the monitor