com.objexcel.gui
Class MDIPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--com.objexcel.gui.MDIPane

public final class MDIPane
extends javax.swing.JComponent

this class manages a bunch of internals. It allows multiple laf's such as a tabbed pane (each tab is an internal) or JInternalFrame mdi view. Fires JInternalFrame.IS_SELECTED_PROPERTY and JInternalFrame.IS_CLOSED_PROPERTY on any components added to it when they are selected/closed (per the PropertyChangeListener)

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
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
 
Constructor Summary
MDIPane()
          constructor
 
Method Summary
 void addComponent(javax.swing.JComponent c, java.lang.String title, javax.swing.ImageIcon i, java.lang.String tip, boolean isClosable)
          add a new internal
 void arrangeWindows()
          arrange windows.
 ObjexcelAbstractAction getChangeLayoutAction()
          return the change layout action
 ObjexcelAbstractAction getCloseAction()
          return the window menu.
 javax.swing.JComponent getComponentAt(int i)
          returns the component at the requested index
 int getComponentIndex(javax.swing.JComponent c)
          returns the index (in order the component was added).
 javax.swing.ImageIcon getIconAt(int i)
           
 int getInternalCount()
          returns the number of internals
 MDIPaneUI getMDIPaneUI()
          returns the current mdi ui
 int getSelectedIndex()
          get the currently selected component
 java.lang.String getTitleAt(int i)
          returns the title at the requested index
 java.lang.String getToolTipTextAt(int i)
           
 javax.swing.JMenu getWindowMenu()
          return the window menu
 void highlightComponent(int index, boolean isHighlighted)
          indicate that the internal at the given index has changed.
 void removeComponent(int index)
          remove the component at this index
 void setIconAt(int i, javax.swing.ImageIcon icon)
          returns the icon at the requested index
 void setMDIPaneUI(MDIPaneUI newMDI)
          change the look and feel of this component
 void setSelectedComponent(int index, boolean isSelected)
          make the component at the specified index the selected one
 void setTitleAt(int i, java.lang.String title)
          sets the title at the requested index
 void setToolTipTextAt(int i, java.lang.String text)
          sets the tool tip at the requested index
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, setLayout, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, bounds, checkImage, checkImage, contains, createImage, createImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, 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, printAll, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MDIPane

public MDIPane()
constructor
Method Detail

setSelectedComponent

public final void setSelectedComponent(int index,
                                       boolean isSelected)
make the component at the specified index the selected one

addComponent

public final void addComponent(javax.swing.JComponent c,
                               java.lang.String title,
                               javax.swing.ImageIcon i,
                               java.lang.String tip,
                               boolean isClosable)
add a new internal

highlightComponent

public final void highlightComponent(int index,
                                     boolean isHighlighted)
indicate that the internal at the given index has changed.

removeComponent

public final void removeComponent(int index)
remove the component at this index

getSelectedIndex

public final int getSelectedIndex()
get the currently selected component

getComponentIndex

public final int getComponentIndex(javax.swing.JComponent c)
returns the index (in order the component was added).

getComponentAt

public final javax.swing.JComponent getComponentAt(int i)
returns the component at the requested index

getTitleAt

public final java.lang.String getTitleAt(int i)
returns the title at the requested index

setTitleAt

public final void setTitleAt(int i,
                             java.lang.String title)
sets the title at the requested index

getIconAt

public final javax.swing.ImageIcon getIconAt(int i)

setIconAt

public final void setIconAt(int i,
                            javax.swing.ImageIcon icon)
returns the icon at the requested index

setToolTipTextAt

public final void setToolTipTextAt(int i,
                                   java.lang.String text)
sets the tool tip at the requested index

getToolTipTextAt

public final java.lang.String getToolTipTextAt(int i)

getInternalCount

public final int getInternalCount()
returns the number of internals

setMDIPaneUI

public final void setMDIPaneUI(MDIPaneUI newMDI)
change the look and feel of this component

arrangeWindows

public void arrangeWindows()
arrange windows. Only does anything if we're using internal frames

getMDIPaneUI

public MDIPaneUI getMDIPaneUI()
returns the current mdi ui

getWindowMenu

public javax.swing.JMenu getWindowMenu()
return the window menu

getCloseAction

public ObjexcelAbstractAction getCloseAction()
return the window menu.

getChangeLayoutAction

public ObjexcelAbstractAction getChangeLayoutAction()
return the change layout action