|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JInternalFrame | +--com.elsid.trellis.BaseModule
Inner classes inherited from class javax.swing.JInternalFrame |
javax.swing.JInternalFrame.AccessibleJInternalFrame, javax.swing.JInternalFrame.JDesktopIcon |
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Field Summary | |
static int |
ALT_KEY
|
Trellis |
base_gui
|
static int |
CTRL_KEY
|
javax.swing.JMenuBar |
menu_bar
|
MenuDesc |
menu_desc
|
static int |
SHIFT_KEY
|
javax.swing.JToolBar |
tool_bar
|
ToolDesc |
tool_desc
|
Fields inherited from class javax.swing.JInternalFrame |
closable, CONTENT_PANE_PROPERTY, desktopIcon, FRAME_ICON_PROPERTY, frameIcon, GLASS_PANE_PROPERTY, iconable, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, isClosed, isIcon, isMaximum, isSelected, LAYERED_PANE_PROPERTY, maximizable, MENU_BAR_PROPERTY, resizable, ROOT_PANE_PROPERTY, rootPane, rootPaneCheckingEnabled, title, TITLE_PROPERTY |
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 javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
BaseModule(Trellis base_gui)
|
Method Summary | |
void |
addConsoleMessage(java.lang.String message)
|
void |
addData(java.lang.Object key,
java.lang.Object data)
|
void |
addMenuItem(java.lang.String menu,
java.lang.String item,
java.lang.String action)
|
boolean |
addMenuItemAccelarator(java.lang.String menu_name,
java.lang.String item_name,
char key,
int modifier)
This method assigns an accelerator character to a given menu item. |
boolean |
addMenuItemMnemonic(java.lang.String menu_name,
java.lang.String item_name,
char mnemonic)
|
boolean |
addMenuMnemonic(java.lang.String menu_name,
char mnemonic)
|
void |
addMenuSeparator(java.lang.String menu)
|
void |
addTool(java.lang.String image_file,
java.lang.String action)
|
void |
addTool(java.lang.String image_file,
java.lang.String action,
java.lang.String name)
|
void |
addToolSeparator()
|
void |
doAbout()
|
void |
doClose()
|
void |
doCopy()
|
void |
doCut()
|
void |
doHelp()
|
void |
doLocalMenuCommand(java.lang.String action_connamd)
|
void |
doNew()
|
void |
doOpen()
|
FileData |
doOpenReadText(java.lang.String file_name)
|
void |
doPaste()
|
void |
doSave()
|
void |
doSaveAs()
|
boolean |
doSaveWriteText(java.lang.String file_name,
java.lang.String text,
int mode)
|
void |
doWhenActivated()
|
void |
doWhenClosed()
|
void |
doWhenClosing()
|
void |
doWhenDeactivated()
|
void |
enableBasicMenus(boolean enable)
|
void |
enableBasicTools(boolean enable)
|
void |
enableMenu(java.lang.String menu_name,
boolean enable)
|
void |
enableMenuItemAction(java.lang.String menu,
java.lang.String action,
boolean enable)
|
void |
enableMenuItemName(java.lang.String menu_name,
java.lang.String item_name,
boolean enable)
|
void |
enableToolAction(java.lang.String action,
boolean enable)
|
void |
finalize()
|
java.lang.String |
getClipboardString()
|
java.lang.Object |
getData(java.lang.Object key)
|
void |
initMenuBar()
|
void |
initToolBar()
|
void |
removeData(java.lang.Object key)
|
void |
setClipboardString(java.lang.String str)
|
void |
setStatusMessage(java.lang.String message)
|
Methods inherited from class javax.swing.JInternalFrame |
addImpl, addInternalFrameListener, createRootPane, dispose, doDefaultCloseAction, fireInternalFrameEvent, getAccessibleContext, getContentPane, getDefaultCloseOperation, getDesktopIcon, getDesktopPane, getFocusOwner, getFrameIcon, getGlassPane, getJMenuBar, getLayer, getLayeredPane, getMenuBar, getNormalBounds, getRootPane, getTitle, getUI, getUIClassID, getWarningString, isClosable, isClosed, isIcon, isIconifiable, isMaximizable, isMaximum, isResizable, isRootPaneCheckingEnabled, isSelected, moveToBack, moveToFront, pack, paintComponent, paramString, remove, removeInternalFrameListener, reshape, restoreSubcomponentFocus, setClosable, setClosed, setContentPane, setDefaultCloseOperation, setDesktopIcon, setFrameIcon, setGlassPane, setIcon, setIconifiable, setJMenuBar, setLayer, setLayer, setLayeredPane, setLayout, setMaximizable, setMaximum, setMenuBar, setNormalBounds, setResizable, setRootPane, setRootPaneCheckingEnabled, setSelected, setTitle, setUI, show, toBack, toFront, 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, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
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, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, 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, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int SHIFT_KEY
public static final int CTRL_KEY
public static final int ALT_KEY
public Trellis base_gui
public javax.swing.JMenuBar menu_bar
public MenuDesc menu_desc
public javax.swing.JToolBar tool_bar
public ToolDesc tool_desc
Constructor Detail |
public BaseModule(Trellis base_gui)
Method Detail |
public void finalize()
finalize
in class java.lang.Object
public final boolean doSaveWriteText(java.lang.String file_name, java.lang.String text, int mode)
This method will write out the given String text to the file file_name. The file_name is selected based on the mode.
If the operation was successful it will return true else it will return false.
String
- file_nameString
- textint
- mode
public final FileData doOpenReadText(java.lang.String file_name)
This method will return a FileData object that will contain the actual name of the file that was opened for reading and its contents as a String. It will display a file dialog prior to opening the file.
If the Open File dialog was exited without a file being selected null will be returned.
String
- file_namepublic final void addConsoleMessage(java.lang.String message)
The message will be displayed in the Trellis Console window.
String
- messagepublic void addToolSeparator()
Add a separator to the tool bar.
public final void addTool(java.lang.String image_file, java.lang.String action)
Add a new tool to the Trellis tool bar. The image to be displayed is contained in the image_file. A name may be attached to the toll image. If the image_file is 'null' then only the tool name is displayed.
When the tool is selected the modules doLocalMenuCommand method will be called with the action passed as an argument.
String
- image_fileString
- actionpublic final void addTool(java.lang.String image_file, java.lang.String action, java.lang.String name)
Add a new tool to the Trellis tool bar. The image to be displayed is contained in the image_file.
When the tool is selected the modules doLocalMenuCommand method will be called with the action passed as an argument.
String
- image_fileString
- actionString
- namepublic final void enableToolAction(java.lang.String action, boolean enable)
String
- actionboolean
- enablepublic void initToolBar()
This method must be called after the last addTool method to create the module tool bar and before any enabling methods.
public void enableBasicTools(boolean enable)
This method must be called after the last addTool method to create the module tool bar and before any enabling methods.
boolean
- enablepublic void addMenuSeparator(java.lang.String menu)
This method must be called after the last addTool method to create the module tool bar and before any enabling methods.
String
- menupublic final void addMenuItem(java.lang.String menu, java.lang.String item, java.lang.String action)
Creates a menu entry.
If the action string is defined, not null, it will be passed to the doLocalMenuCommand when this item is selected. If the action is null then the item name will be passed to the doLocalMenuCommand .
String
- menuString
- itemString
- actionpublic final void initMenuBar()
This method must be called after the last addMenuItem method to create the module menu bar and before any enabling methods.
public final void enableMenu(java.lang.String menu_name, boolean enable)
String
- menu_nameboolean
- enablepublic final void enableMenuItemName(java.lang.String menu_name, java.lang.String item_name, boolean enable)
String
- menu_nameString
- item_nameboolean
- enablepublic final void enableMenuItemAction(java.lang.String menu, java.lang.String action, boolean enable)
String
- menueString
- actionboolean
- enablepublic void enableBasicMenus(boolean enable)
boolean
- enablepublic boolean addMenuItemAccelarator(java.lang.String menu_name, java.lang.String item_name, char key, int modifier)
This method assigns an accelerator character to a given menu item. In addition to the accelerator character a modifier may be assigned to the accelerator key.
String
- menu_nameString
- item_namechar
- keyint
- modifier
public boolean addMenuItemMnemonic(java.lang.String menu_name, java.lang.String item_name, char mnemonic)
This method will under line the given letter in the menu item name allowing that character to be pressed to activate the menu item.
String
- menu_nameString
- item_namechar
- mnemonicpublic boolean addMenuMnemonic(java.lang.String menu_name, char mnemonic)
This method will under line the given letter in the menu name allowing that character to be pressed along with the ALT key to activate the menu.
String
- menu_namechar
- mnemonicpublic final void setStatusMessage(java.lang.String message)
The message is displayed on the Trellis Status line. The previous message will be erased.
String
- messagepublic final java.lang.String getClipboardString()
Returns the current String object in the system clipboard. If no string is their then null is returned.
- public final void setClipboardString(java.lang.String str)
Places the passed string into the system clipboard.
String
- strpublic final void addData(java.lang.Object key, java.lang.Object data)
Add this Object to the data sorage manager.
Object
- keyObject
- datapublic final void removeData(java.lang.Object key)
Add this Object to the data sorage manager.
Object
- keypublic final java.lang.Object getData(java.lang.Object key)
Add this Object to the data sorage manager.
Object
- keypublic void doWhenActivated()
Add this Object to the data sorage manager.
public void doWhenDeactivated()
Add this Object to the data sorage manager.
public void doWhenClosing()
This method is processed prior to the module being closed.
public void doWhenClosed()
This method is processed after the module has been closed but before it has been disposed of.
public void doClose()
Processed when the menu File Close is selected.
public void doNew()
Processed when the menu File New or the Tool Bar New is selected.
public void doOpen()
Processed when the menu File Open or the Tool Bar Open is selected.
public void doSave()
Processed when the menu File Save or the Tool Bar Save is selected.
public void doSaveAs()
Processed when the menu File Save As is selected.
public void doCut()
Processed when the menu Edit Cut or the Tool Bar Cut is selected.
public void doCopy()
Processed when the menu Edit Copy or the Tool Bar Copy is selected.
public void doPaste()
Processed when the menu Edit Paste or the Tool Bar Paste is selected.
public void doHelp()
Processed when the menu Help Help is selected.
public void doAbout()
Processed when the menu Help About is selected.
public void doLocalMenuCommand(java.lang.String action_connamd)
This menu is call when ever a user defined menu entry or tool bar toll is selected.
If the selected item has an action string assigned to it the string will be passed as the argument if not then the name of the item will be passed.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |