fr.ove.openmath.mathematica
Class WorkBook

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byfr.ove.openmath.mathematica.WorkBook
All Implemented Interfaces:
java.util.EventListener, java.awt.image.ImageObserver, javax.swing.event.InternalFrameListener, java.awt.MenuContainer, Savable, java.io.Serializable

public class WorkBook
extends javax.swing.JComponent
implements javax.swing.event.InternalFrameListener, Savable

A work book. Is intended to be used to access different inner frames in a Desktop by means labelled tabs.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
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
WorkBook(ConnectionFactory factory, StatusBar statusBar)
          The Constructor.
 
Method Summary
 void addChangeListener(javax.swing.event.ChangeListener l)
          Adds a ChangeListener to the instance.
 void addPalette(java.lang.String paletteIdentifier, java.awt.Container contentPane)
          Adds a new palette to the desktop.
 void addTab()
          Adds a new tab (i.e. a new inner frame into the Desktop) to the WorkBook.
 void cascade()
          Cascade the frame in the desktop.
 void closeAll()
          Closes all the frames in the desktop.
protected  void fireStateChanged()
          Send a ChangeEvent, whose source is this tabbedpane, to each listener.
 javax.swing.JInternalFrame getActiveInternalFrame()
          Returns the active inner frame in the work book.
 StatusBar getStatusBar()
          Returns the status bar.
 int getTabCount()
          Returns the number of tab (i.e. inner frames) in the instance.
 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)
           
 boolean isSaveNeeded()
          Checks if the instance need to be saved.
 void open()
          Opens a file.
 void removeChangeListener(javax.swing.event.ChangeListener l)
          Removes a ChangeListener from the instance.
 void removeTab(java.lang.String name)
          Removes the tab with the specified name.
 java.lang.Object save()
          Saves the instance.
 java.lang.Object save(java.io.File file)
          Saves the instance into the specified file.
 java.lang.Object saveAs(java.lang.String name)
          Saves the instance with the specified name.
 void setSaveNeeded(boolean needed)
          Sets if the instance need to be saved.
 void showPalette(java.lang.String identifier)
          Shows the palette with the specified name identfier.
 
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, getAccessibleContext, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, 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, updateUI
 
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, imageUpdate, 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, 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
 

Constructor Detail

WorkBook

public WorkBook(ConnectionFactory factory,
                StatusBar statusBar)
The Constructor.

Method Detail

addTab

public void addTab()
Adds a new tab (i.e. a new inner frame into the Desktop) to the WorkBook.


addPalette

public void addPalette(java.lang.String paletteIdentifier,
                       java.awt.Container contentPane)
Adds a new palette to the desktop.

Parameters:
paletteIdentifier - the palette identfier.

showPalette

public void showPalette(java.lang.String identifier)
Shows the palette with the specified name identfier.

Parameters:
identifier - the palette identifier.

removeTab

public void removeTab(java.lang.String name)
Removes the tab with the specified name.

Parameters:
name - the name of the tab.

getActiveInternalFrame

public javax.swing.JInternalFrame getActiveInternalFrame()
Returns the active inner frame in the work book.


getTabCount

public int getTabCount()
Returns the number of tab (i.e. inner frames) in the instance.


addChangeListener

public void addChangeListener(javax.swing.event.ChangeListener l)
Adds a ChangeListener to the instance.

Parameters:
l - the ChangeListener to add
See Also:
fireStateChanged(), removeChangeListener(javax.swing.event.ChangeListener)

cascade

public void cascade()
Cascade the frame in the desktop.


closeAll

public void closeAll()
Closes all the frames in the desktop.


removeChangeListener

public void removeChangeListener(javax.swing.event.ChangeListener l)
Removes a ChangeListener from the instance.

Parameters:
l - the ChangeListener to remove
See Also:
fireStateChanged(), addChangeListener(javax.swing.event.ChangeListener)

fireStateChanged

protected void fireStateChanged()
Send a ChangeEvent, whose source is this tabbedpane, to each listener. This method method is called each time a ChangeEvent is received from the model.

See Also:
addChangeListener(javax.swing.event.ChangeListener), EventListenerList

getStatusBar

public StatusBar getStatusBar()
Returns the status bar.


internalFrameActivated

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

internalFrameClosed

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

internalFrameClosing

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

internalFrameDeactivated

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

internalFrameDeiconified

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

internalFrameIconified

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

internalFrameOpened

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

save

public java.lang.Object save()
Saves the instance.

Specified by:
save in interface Savable

save

public java.lang.Object save(java.io.File file)
Saves the instance into the specified file.

Specified by:
save in interface Savable

saveAs

public java.lang.Object saveAs(java.lang.String name)
Saves the instance with the specified name.

Specified by:
saveAs in interface Savable
Parameters:
name - the specified name.

isSaveNeeded

public boolean isSaveNeeded()
Checks if the instance need to be saved.

Specified by:
isSaveNeeded in interface Savable
Returns:
true if the instance need to be saved. false otherwise.

setSaveNeeded

public void setSaveNeeded(boolean needed)
Sets if the instance need to be saved.

Specified by:
setSaveNeeded in interface Savable
Parameters:
needed - true if the instance need to be saved. false otherwise.

open

public void open()
Opens a file.



Copyright © 1999-2007 Universit?© de Nice Sophia-Antipolis, I3S, Ove SARL, DFKI and Universit?§t des Saarlandes. All Rights Reserved.