NUREG/CR-6974, Vol. 3 

Appendix A, Part B 

Symbolic Nuclear 

Analysis Package 

(SNAP) 

Common Application Framework for 

Engineering Analysis (CAFEAN) 

Preprocessor Plug-in Application 

Programming Interface 

Office of Nuclear Regulatory Research 
NUREG/CR-6974, Vol. 3 

Appendix A, Part B 

Symbolic Nuclear 

Analysis Package 

(SNAP) 

Common Application Framework for 

Engineering Analysis (CAFEAN) 

Preprocessor Plug-in Application 

Programming Interface 

Manuscript Completed: June 2008 

Date Published: June 2009 

Prepared by 

K. Jones, J. Rothe, W. Dunsford 

Applied Programming Technology, Inc. 

Bloomsburg, PA 17815 

C. Gingrich, NRC Project Manager 

NRC Job Code Y6851 

Office of Nuclear Regulatory Research
ii
 iii

ABSTRACT 

Many of the analytical codes developed by the Office of Nuclear Regulatory Research (RES) rely on a 

text based input file to specify model parameters and computational options. The formats of the text 

based input files are often quite complex and usually require careful study before a user can create an 

input model that functions correctly. The Symbolic Nuclear Analysis Package (SNAP) is primarily a 

graphical user interface that was developed to simplify the analyst’s task of creating input files for the 

analytic codes as well as helping to visualize code results. SNAP is a Java based computer application 

that runs on the most popular computer platforms including Windows XP and Vista, LINUX based 

systems, and Mac OS X. The code architecture used in SNAP is “plug-in” based and very flexible. 

Third party developers can implement their own user interfaces under SNAP without breaking the 

interfaces developed by other developers. The application programming interface (API) that is described 

in this document provides a short tutorial and some guidelines for developing a custom plug-in that works 

in the SNAP framework. This document also includes the actual API method and data-structure 

definitions needed to create such a custom interface. 
iv
v

FOREWORD 

This document is intended for code developers interested in creating applications or “plug-ins” that work 

with the Symbolic Nuclear Analysis Package (SNAP). 

The code architecture used in the Symbolic Nuclear Analysis Package (SNAP) is plug-in based and very 

flexible. Third party developers can implement their own user interfaces under SNAP by carefully 

following the application programming interface (API) that is described in this document. The “Main 

Report” of this document provides a simple tutorial and some guidelines for developing a custom plug-in 

that works with SNAP. The SNAP application and its plug-ins are based on the Common Application 

Framework for Engineering Analysis (CAFEAN) Java-based API. Appendix A of this document is 

automatically generated directly from the CAFEAN Java code by the JavaDoc application. 

The CAFEAN API is still in development and, therefore, the information in this document is likely to 

change relatively frequently, perhaps as often as once per year. Code developers should make sure that 

they have the most up-to-date version of this document when using the CAFEAN API. 

 
vi
Table of Contents 

vii 

ABSTRACT .............................................................................................................................. iii

FOREWORD .............................................................................................................................. v

PREFACE .................................................................................................................................. ix

1. Introduction .............................................................................................................................. 1-1

2. Preprocessor Plug-in Implementation ...................................................................................... 2-1

2.1 Plug-in Interface Classes ................................................................................................... 2-2

2.2 Plugin Interface Operations ............................................................................................... 2-4

2.2.1 Processing Batch Commands .................................................................................... 2-4

2.2.2 Adding Menu Items ................................................................................................... 2-4

2.2.3 Submitting Jobs ......................................................................................................... 2-4

2.2.4 Plugin Preferences ..................................................................................................... 2-4

2.2.4.1 Loading and Saving Preferences ....................................................................... 2-4

2.2.4.2 Editing Preferences ........................................................................................... 2-5

2.2.5 Essential Core Classes for a Code Plug-in ................................................................ 2-5

2.3 The Multi-View Architecture ............................................................................................ 2-9

2.4 Creating a Model ............................................................................................................. 2-11

2.4.1 Component Categories ............................................................................................ 2-11

2.4.2 Foreign Key Relationships ...................................................................................... 2-11

2.4.3 Methods to Implement ............................................................................................ 2-12

2.4.4 Model Options ......................................................................................................... 2-14

2.4.5 Root Components .................................................................................................... 2-15

2.4.6 Component Number Groups ................................................................................... 2-15

2.5 Creating Bean Based Components .................................................................................. 2-17

2.5.1 Methods to Implement ............................................................................................ 2-17

2.5.1.1 Useful Utility Methods .................................................................................... 2-20

2.5.2 The ComponentListener Interface ........................................................................... 2-20

2.5.2.1 AbstractComponent Methods .......................................................................... 2-20

2.5.2.2 ComponentListener Methods .......................................................................... 2-21

2.6 Creating Connections ...................................................................................................... 2-22

2.6.1 Methods to Implement ............................................................................................ 2-22

2.6.2 Connection Drawing ............................................................................................... 2-23

2.7 ModelEditor Documents ................................................................................................. 2-25

2.7.1 The PIB Format ....................................................................................................... 2-25

2.7.2 Loading a Model ..................................................................................................... 2-26

2.7.3 Saving a Model ....................................................................................................... 2-26

2.7.4 PibFile Load/Save Example .................................................................................... 2-27

2.7.5 Model Load/Save Example ..................................................................................... 2-29

2.8 Undo and Redo ................................................................................................................ 2-31

2.9 Creating Connectible Components .................................................................................. 2-32

2.9.1 Methods to Implement ............................................................................................ 2-33

2.10 Plugin-Specific Unit Types ........................................................................................... 2-36

2.10.1 Supporting Units in the Model .............................................................................. 2-36

2.10.2 Units Classes ......................................................................................................... 2-37

2.11 Model Validation ........................................................................................................... 2-39

2.11.1 ValidationTest Implementation ............................................................................. 2-39

2.11.2 ValidationTest Methods in the Model ................................................................... 2-40

2.12 Using the Property View ............................................................................................... 2-41

2.12.1 The PropertyController Interface .......................................................................... 2-41
Table of Contents 

viii 

2.12.1.1 Disabled and Optional ................................................................................... 2-41

2.12.1.2 Re-sizable ...................................................................................................... 2-41

2.12.1.3 Attribute Ordering ......................................................................................... 2-42

2.12.2 Attribute Groups .................................................................................................... 2-42

2.13 Using Registered Dialogs .............................................................................................. 2-43

2.14 Customizing the 2D View ............................................................................................. 2-44

2.14.1 Adding Toolbars .................................................................................................... 2-44

2.14.2 Insertion Handlers and the Insertable Interface ..................................................... 2-44

2.14.3 Creating Custom Mouse Handlers ........................................................................ 2-45

2.15 Useful Utility Classes .................................................................................................... 2-46

2.15.1 Interfaces ............................................................................................................... 2-46

2.15.2 Bean Editors .......................................................................................................... 2-47

2.15.3 GUI Utilities .......................................................................................................... 2-48

3. Packaging a Plug-in .................................................................................................................. 3-1

4. Preprocessor Python Scripting ................................................................................................. 4-1

4.1 Built-in Python Methods ................................................................................................... 4-2

4.2 Core CAFEAN Classes ..................................................................................................... 4-3

4.2.1 Real Class .................................................................................................................. 4-3

4.2.2 AbstractComponent Abstract Class .......................................................................... 4-3

4.3 TRACE Plug-in Examples ................................................................................................ 4-5

4.3.1 Hydraulic Components .............................................................................................. 4-5

4.3.1.1 Example Scripts ................................................................................................ 4-6

Example 1: Pipe Component General Data Access. ............................................... 4-6

Example 2: Calculation of Total Volume for a Pipe Component . .......................... 4-6

Example 3: Display of Edge Data for Pipe Component. ......................................... 4-7

Example 4: Calculation of Total Volume for a Tee Component . ........................... 4-7

4.3.1.2 3D Vessel Component ...................................................................................... 4-7

Example 5: Vessel Component General Data Access. ............................................. 4-7

4.3.1.3 Heat Structures .................................................................................................. 4-8

Example 6: Heat Structure General Data Access. .................................................... 4-8

Appendix A: JavaDoc for the CAFEAN API .............................................................................. A-1 

Appendix A: Part A ................................................................................................................ A-1 

Appendix A: Part B ............................................................................................................ A-399 

Appendix A: Index ............................................................................................................. A-913
ix 

PREFACE 

This document is divided into several volumes. The first volume contains the “Main 

Report”; a general overview of the application programming interface (API) used by the 

Symbolic Nuclear Analysis Package (SNAP) and providing simple guidance on how to 

use the SNAP API. The remaining volumes of this document contain “Appendix A,” the 

actual API specification and documentation. Except for its front matter, Appendix A is 

the direct output from the standard JAVA documentation program known as “JavaDoc”. 

Appendix A is split into multiple volumes due to its large size. 

The Main Report as well as Appendix A was written primarily by Ken Jones, John 

Rothe, and William Dunsford, of Applied Programming Technology, Inc.. (APT, Inc). 

APT, Inc, is the primary developer of the Symbolic Nuclear Analysis Package (SNAP) 

and associated Common Application Framework for Engineering Analysis (CAFEAN). 
com.cafean.client.ui

Class DrawnView

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JPanel

 |

 +-com.cafean.client.ui.DockablePanel

 |

 +-com.cafean.client.ui.DrawnView

public class DrawnView

extends DockablePanel

implements ModelElement, javax.accessibility.Accessible, java.io.Serializable, HasGetTransferHandler,

java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, MenuListener

The DrawnView is the panel that displays AbstractComponents and their connections. Each DrawnView contains a ZoomablePanel

that allows the user to zoom into or out of a view. Each DrawnView also corrisponds to a ViewComponent inside the

AbstractModel. The ViewComponent stores all the important information for creating a DrawnView while loading and saving a

model. The DrawnView is a MenuListener on the edit menu. The Tools menu of a DrawnView is filled by both the MECodePlugin of

it's AbstractModel and by the Feature plugins in the ModelEditor.

All Implemented Interfaces:

MenuListener, java.io.Serializable, java.awt.MenuContainer, java.awt.image.ImageObserver, HasGetTransferHandler,

java.io.Serializable, javax.accessibility.Accessible, ModelElement

Field Summary

public static final NODE_FLAVOR

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Constructor Summary

A-399
public DrawnView(AbstractModel model, ViewComponent viewComp)

Creates a new instance of DrawnView.

Method Summary

void addAnnotation(Annotation comp)

This adds an Annotation to the center of the panel's viewport.

void addAnnotation(Annotation comp, boolean tofront)

This adds an Annotation to the center of the panel's viewport.

void addComponents(Iterator itr)

Adds a list of components by an iterator on a list of components.

void addComponents(Iterator itr, boolean select)

Adds a list of components by an iterator on a list of components.

DrawnComponent addDrawnComponent(AbstractComponent comp, boolean select)

This adds a specific AbstractComponent to a drawn view.

void addDrawnComponent(DrawnComponent comp, boolean select)

This adds a specific DrawnComponent to this DrawnView.

void addDrawnComponent(DrawnComponent comp, boolean select, boolean withCons)

This adds a specific DrawnComponent to this DrawnView.

void addMenuItem(JMenuItem item)

This allows plugins to add menu items to the "Tools" menu for this DrawnView.

void addOverlapPanel(OverlapPanel panel)

Adds an overlapping internal panel to this view for use as a user input sub-dialog.

void addToolbar(JToolBar toolbar, String prefix, boolean visible)

Adds the given toolbar to this DrawnView.

void clearSelection()

Clears the current selection from the zoom panel's bean box

int compareTo(DockablePanel panel)

Compares this panel with the specified panel for order.

Vector getAnnotations()

Gets all of the annotations in the panel for this Drawn View.

BeanBox getBeanBox()

An accessor for the BeanBox from the ZoomablePanel

java.awt.Dimension getCanvasSize()

Getter for the size of the ZoomablePanel

Vector getComponents(boolean includeConnections)

Returns all of the components stored inside the beanbox in an array.

DrawnComponent getDrawnComponentAt(int i)

Returns the DrawnComponent at a given index inside the bean Box.

A-400
int getDrawnComponentCount()

Returns the number of DrawnComponents that exist inside this drawn view.

DrawnComponent[] getDrawnComponents()

Returns all of the components stored inside the beanbox in an array.

JMenuBar getMenubar()

AbstractModel getModel()

Gets the AbstractModel for this DrawnView.

DrawnComponent[] getSelectedComponents()

Returns all of the components that are selected inside the beanbox in an array.

static int getTemplateCC(java.io.File file)

String getTitle()

Returns the title of the dialog containing this view or the name of the ViewComponent.

Toolbox getToolbox()

Retrieves this DrawnView's Toolbox.

ViewComponent getViewComponent()

Gets the ViewComponent for this DrawnView.

static byte[] getViewImage(java.io.File file)

java.awt.Point getViewPosition()

Returns the upper left coordinate of the viewport in the main scroll pane this should make sure

that the view stores this location for a local save.

java.awt.Dimension getViewSize()

Returns the dimensions of the viewport in the main scroll pane.

ZoomablePanel getZoomablePanel()

An accessor for the ZoomablePanel

double getZoomScale()

Getter for the scale of the ZoomablePanel

boolean importTemplate(java.io.File file)

boolean importTemplate(java.io.File file, int existingCount)

void layoutView()

This organizes all of the components within the view

void menuCanceled(MenuEvent e)

This implements the functionality of the javax.swing.event.MenuListener interface.

void menuDeselected(MenuEvent e)

This implements the functionality of the javax.swing.event.MenuListener interface.

A-401
void menuSelected(MenuEvent e)

This implements the functionality of the javax.swing.event.MenuListener interface.

void panelRemoved()

Called to notify this view that it has been removed.

void panelSelected()

Called to notify this view that it has been selected.

boolean printView(boolean usePerspective)

Prints this view

boolean printView(org.apache.batik.transcoder.print.PrintTranscoder transcoder,

boolean usePerspective)

Prints this view into the given transcoder.

void resetZoomMenu()

Reset the zoom menu to ensure the current zoom factor is selected or none if the zoom is

between selections.

void setCanvasSize(java.awt.Dimension size)

Setter for the size of the ZoomablePanel

void setLocked(boolean locked)

Locks this View ( and updates the ViewComponent ).

void setViewPosition(java.awt.Point p)

Sets the upper left coordinate of the viewport in the main scroll pane this should make sure that

the view shows exactly what was shown when last open.

void setVisible(boolean b)

void setZoomScale(double scale)

Setter for the scale of the ZoomablePanel

java.io.File snapshotView()

Creates an image snapshot of this view for use in the DrawnViewComponent.

void updateToolbars()

Enables and/or disables toolbar buttons based on such things as the current BeanBox selection.

Methods inherited from class com.cafean.client.ui.DockablePanel

compareTo, getModel, getTitle, panelRemoved, panelSelected, setTitle, toFront

Methods inherited from class javax.swing.JPanel

getAccessibleContext, getUI, getUIClassID, setUI, updateUI

Methods inherited from class javax.swing.JComponent

A-402
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-403
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-404
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface com.cafean.client.analysis.ModelElement

getModel

Methods inherited from interface javax.swing.event.MenuListener

menuCanceled, menuDeselected, menuSelected

Fields

NODE_FLAVOR

public static final java.awt.datatransfer.DataFlavor NODE_FLAVOR

Constructors

DrawnView

public DrawnView(AbstractModel model,

 ViewComponent viewComp)

Creates a new instance of DrawnView. This should only be done by the ViewComponent that is opening.

Methods

getMenubar

public JMenuBar getMenubar()

getTemplateCC

public static int getTemplateCC(java.io.File file)

getViewImage

public static byte[] getViewImage(java.io.File file)

A-405
importTemplate

public boolean importTemplate(java.io.File file)

importTemplate

public boolean importTemplate(java.io.File file,

 int existingCount)

addOverlapPanel

public void addOverlapPanel(OverlapPanel panel)

Adds an overlapping internal panel to this view for use as a user input sub-dialog.

addToolbar

public void addToolbar(JToolBar toolbar,

 String prefix,

 boolean visible)

Adds the given toolbar to this DrawnView. The toolbar's visibility will default to the given visibility and controlled by a menu

item and user preference, both named by the toolbar's current name.

Parameters:

toolbar - the JToolBar instance to add to this view's toolbar panel. Buttons may be added before or after this method is

called.

prefix - a String containing the prefix to the ModelEditor preference to use when showing or hiding the toolbar

visible - if true, the toolbar will be visible by default

setLocked

public void setLocked(boolean locked)

Locks this View ( and updates the ViewComponent ).

getToolbox

public Toolbox getToolbox()

Retrieves this DrawnView's Toolbox.

Returns:

the Toolbox for this DrawnView.

getViewComponent

public ViewComponent getViewComponent()

Gets the ViewComponent for this DrawnView.

A-406
Returns:

the ViewComponent.

getModel

public AbstractModel getModel()

Gets the AbstractModel for this DrawnView.

Returns:

the AbstractModel.

addComponents

public void addComponents(Iterator itr)

Adds a list of components by an iterator on a list of components. These components are not selected after they are added to

the view. Any connection between components in the view is rendered with a DrawnConnection.

Parameters:

itr - the Iterator on a list of components.

addComponents

public void addComponents(Iterator itr,

 boolean select)

Adds a list of components by an iterator on a list of components. Any connection between components in the view is rendered

with a DrawnConnection.

Parameters:

itr - the Iterator on a list of components.

select - true if the components should be added to the selection after they are added.

addDrawnComponent

public void addDrawnComponent(DrawnComponent comp,

 boolean select,

 boolean withCons)

This adds a specific DrawnComponent to this DrawnView. The DrawnComponent's position will not be set.

Parameters:

comp - the DrawnComponent to be added.

select - true if the component should be added to the selection after it is added.

withCons - if true, DrawnConnection will be created for each connection in the component whos opposite side exists in

the view.

addDrawnComponent

public void addDrawnComponent(DrawnComponent comp,

 boolean select)

This adds a specific DrawnComponent to this DrawnView. The DrawnComponent's position will not be set.

DrawnConnection will be created for each connection in the component whos opposite side exists in the view.

A-407
Parameters:

comp - the DrawnComponent to be added.

select - true if the component should be added to the selection after it is added.

addDrawnComponent

public DrawnComponent addDrawnComponent(AbstractComponent comp,

 boolean select)

This adds a specific AbstractComponent to a drawn view. A new DrawnComponent is created from the component, and is

inserted into the center of the viewport. If the component has a connection to or from any components already in the view are

rendered with a @link DrawnConnection}.

Parameters:

comp - the AbstractComponent to be added.

select - true if the component should be added to the selection after it is added.

addAnnotation

public void addAnnotation(Annotation comp)

This adds an Annotation to the center of the panel's viewport. After the Annotation is added, it resets it's bounds.

Parameters:

comp - the Annotation being added to the view.

addAnnotation

public void addAnnotation(Annotation comp,

 boolean tofront)

This adds an Annotation to the center of the panel's viewport. After the Annotation is added, it resets it's bounds.

Parameters:

comp - the Annotation being added to the view.

layoutView

public void layoutView()

This organizes all of the components within the view

getDrawnComponentCount

public int getDrawnComponentCount()

Returns the number of DrawnComponents that exist inside this drawn view.

Returns:

The number of components inside the beanbox

A-408
getDrawnComponentAt

public DrawnComponent getDrawnComponentAt(int i)

Returns the DrawnComponent at a given index inside the bean Box.

Parameters:

i - The index of the drawn component.

Returns:

the DrawnComponent at i.

getDrawnComponents

public DrawnComponent[] getDrawnComponents()

Returns all of the components stored inside the beanbox in an array. This includes connections but not annotations.

Returns:

the DrawnComponent[] of components in the beanbox.

getComponents

public Vector getComponents(boolean includeConnections)

Returns all of the components stored inside the beanbox in an array. This may include connections but not annotations.

Parameters:

includeConnections - if true DrawnConnections will be included in the selection.

Returns:

the Vector containing the components in the beanbox.

getSelectedComponents

public DrawnComponent[] getSelectedComponents()

Returns all of the components that are selected inside the beanbox in an array. This includes connections but not

annotations.

Returns:

the DrawnComponent[] of selected components in the beanbox.

setVisible

public void setVisible(boolean b)

snapshotView

public java.io.File snapshotView()

Creates an image snapshot of this view for use in the DrawnViewComponent.

A-409
Returns:

a java.io.File that refers to the temporary file that the snapshot is stored in.

printView

public boolean printView(boolean usePerspective)

Prints this view

Returns:

true if successful

printView

public boolean printView(org.apache.batik.transcoder.print.PrintTranscoder transcoder,

 boolean usePerspective)

Prints this view into the given transcoder.

Parameters:

transcoder - the GPrintTranscoderto print into.

Returns:

true if successful

resetZoomMenu

public void resetZoomMenu()

Reset the zoom menu to ensure the current zoom factor is selected or none if the zoom is between selections.

getCanvasSize

public java.awt.Dimension getCanvasSize()

Getter for the size of the ZoomablePanel

Returns:

the Dimension containing the size of the ZoomablePanel's canvas.

setCanvasSize

public void setCanvasSize(java.awt.Dimension size)

Setter for the size of the ZoomablePanel

Parameters:

size - the Dimension containing the new size of the ZoomablePanel's canvas.

See Also:

ZoomablePanel.setPanelSize(Dimension)

A-410
getZoomScale

public double getZoomScale()

Getter for the scale of the ZoomablePanel

Returns:

the double scale factor of the ZoomablePanel.

See Also:

ZoomablePanel.getScale()

setZoomScale

public void setZoomScale(double scale)

Setter for the scale of the ZoomablePanel

Parameters:

scale - The new scale of the ZoomablePanel

getViewPosition

public java.awt.Point getViewPosition()

Returns the upper left coordinate of the viewport in the main scroll pane this should make sure that the view stores this location

for a local save.

Returns:

the view position of the main scroll pane's view port.

getViewSize

public java.awt.Dimension getViewSize()

Returns the dimensions of the viewport in the main scroll pane. This is used to determine if a component is inside the current

view.

setViewPosition

public void setViewPosition(java.awt.Point p)

Sets the upper left coordinate of the viewport in the main scroll pane this should make sure that the view shows exactly what

was shown when last open.

Parameters:

p - The Point setting the view position of the main scroll pane's viewport.

clearSelection

public void clearSelection()

Clears the current selection from the zoom panel's bean box

A-411
updateToolbars

public void updateToolbars()

Enables and/or disables toolbar buttons based on such things as the current BeanBox selection.

menuSelected

public void menuSelected(MenuEvent e)

This implements the functionality of the javax.swing.event.MenuListener interface. Invoked when the edit menu is

selected. This allows the BeanBox to determine if the various events can occur with the given selection.

Parameters:

e - the MenuEvent object

See Also:

BeanBox.canCopy()

BeanBox.canPaste()

BeanBox.canDelete()

ComponentPaster.canPasteSpecial(java.lang.Object)

menuDeselected

public void menuDeselected(MenuEvent e)

This implements the functionality of the javax.swing.event.MenuListener interface. Invoked when the menu is

deselected.

Parameters:

e - the MenuEvent object {@inheritDoc}

menuCanceled

public void menuCanceled(MenuEvent e)

This implements the functionality of the javax.swing.event.MenuListener interface. Invoked when the menu is

cancelled.

Parameters:

e - the MenuEvent object {@inheritDoc}

addMenuItem

public void addMenuItem(JMenuItem item)

This allows plugins to add menu items to the "Tools" menu for this DrawnView. The item is appended to the bottom of the

"Tools" menu.

Parameters:

item - the JMenuItem being added to the view.

A-412
getAnnotations

public Vector getAnnotations()

Gets all of the annotations in the panel for this Drawn View.

Returns:

the Vector containing all of the annotations in this view.

See Also:

BeanBox.getAnnotations()

getBeanBox

public BeanBox getBeanBox()

An accessor for the BeanBox from the ZoomablePanel

Returns:

the BeanBox

getZoomablePanel

public ZoomablePanel getZoomablePanel()

An accessor for the ZoomablePanel

Returns:

the ZoomablePanel

panelSelected

public void panelSelected()

Called to notify this view that it has been selected.

This implementation calls on its BeanBox to update its selection and thus the main property view selection.

See Also:

updateSelectioon

panelRemoved

public void panelRemoved()

Called to notify this view that it has been removed.

This implementation calls on its BeanBox to update its selection and thus the main property view selection.

See Also:

updateSelectioon

A-413
getTitle

public String getTitle()

Returns the title of the dialog containing this view or the name of the ViewComponent.

compareTo

public int compareTo(DockablePanel panel)

Compares this panel with the specified panel for order. Returns a negative integer, zero, or a positive integer as this object is

less than, equal to, or greater than the specified panel.

This method is used by the DockedPane to insert this panel into the appropriate place in the displayed panels.

Parameters:

panel - the DockablePanel to be compared.

Returns:

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

A-414
com.cafean.client.ui

Class DrawnViewComponent

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-com.cafean.client.ui.DrawnComponent

 |

 +-com.cafean.client.ui.DrawnViewComponent

public class DrawnViewComponent

extends DrawnComponent

implements Cloneable, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, StateEditable,

ComponentListener, AnimationBeanGenerator, java.io.Serializable, HasGetTransferHandler,

java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, Groupable

A DrawnComponent extension used to render one ViewComponent inside another View. This includes embedded connections and an

image.

All Implemented Interfaces:

Groupable, java.io.Serializable, java.awt.MenuContainer, java.awt.image.ImageObserver, HasGetTransferHandler,

java.io.Serializable, AnimationBeanGenerator, ComponentListener, StateEditable,

java.awt.event.MouseMotionListener, java.awt.event.MouseListener, Cloneable

See Also:

com.cafean.client.ui.DrawnEmbeddedConnection, ViewComponent

Field Summary

public static final ID

string id used to identify the template type for a polygon bean

Value: DrawnViewComponent

Fields inherited from class com.cafean.client.ui.DrawnComponent

BOTTOM, CENTER, CENTER_H, CENTER_V, CIRCLE, CROSSHATCH, DIAMOND, DOWN, LEFT, max_positions, NONE,

PIXELS_P_METER, RIGHT, SEGMENT_BOTH, SEGMENT_INLET, SEGMENT_NONE, SEGMENT_OUTLET,

SEGMENT_SPECIAL, SQUARE, TOP, TRIANGLE, UP

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 java.awt.image.ImageObserver

A-415
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Fields inherited from interface javax.swing.undo.StateEditable

RCSID

Constructor Summary

public DrawnViewComponent(AbstractComponent c)

Creates a new instance of DrawnComponentView

Method Summary

TemplateEntry createTemplateEntry()

Creates a new TemplateEntry for this DrawnComponent that stores all of the location and state

data for this DranwComponent.

void draw(java.awt.Graphics2D g, boolean selected)

Draw a simple X'd box if there is no image.

DrawnEmbeddedConnecti

on

findEmbedded(DrawnEmbeddedConnection[] array, int comp, ConnectionData

data)

ConnectingPt getConnectingPt(int compIdent, ConnectionData data)

Vector getCustomPopupItems()

java.awt.Dimension getMinimumSize()

DrawnSubComponent getSubComponentAt(int x, int y)

boolean hasSubComponents()

void InitDrawing()

Creates a draw view component and puts it in the drawing vectors.

boolean isRepresenting(int compid)

void loadDrawnComponent(com.apt.xdr.PibBlock block)

void mouseClicked(java.awt.event.MouseEvent e)

void mouseMoved(java.awt.event.MouseEvent e)

void readTemplateEntry(TemplateEntry entry)

Sets the data on this DrawnComponent from a TemplateEntry read in from a view template

file.

A-416
void restoreState(Hashtable state)

Restore the state of the bean from an earlier edit.

void setBounds(java.awt.Rectangle r)

com.apt.xdr.PibBlock store(int viewNum)

void storeState(Hashtable state)

Store the state of the bean to permit undo.

Methods inherited from class com.cafean.client.ui.DrawnComponent

addNotify, canBeResized, Clear, clearLinks, clone, componentChanged, componentConnected,

componentDeleted, componentDisconnected, connectLinks, contains, contains, contains,

createBorderRegion, createCenterShape, createConnectionPrototypes, createConnectionPt,

createDisplayBeans, createPopupMenu, createTemplateEntry, disconnectAllMyLinks, draw,

drawLabelStrings, flip, forTransformPoint, getBeanBox, getClockwiseFace, getComponent,

getComponentID, getConnectingLocation, getConnectingPt, getConnectingPt,

getConnectingPtAt, getConnectSize, getCounterFace, getCrossflowIndex,

getCustomPopupActions, getCustomPopupItems, getCustomPopupItems, getDefaultDrawLength,

getDefaultDrawWidth, getDrawAngle, getDrawingFace, getDrawingObject, getFaceByAngle,

getFillColor, getGlassPane, getGroupID, getHandleSize, getIndicatorColor, getLength,

getLenScaleFactor, getMaxHeight, getMaxWidth, getMinWidth, getMirrorImageShape,

getNormalObj, getNumberConnections, getOppositeFace, getOrientation, getOrientationMenu,

getOrientationName, getParent, getPreferredSize, getSelectedConnector,

getSelectedDropZone, getSubComponentAt, getToolTipText, getToolTipText,

getWidthScaleFactor, getX_Pos, getXDistBetweenCPs, getXDistBetweenXflowCPs, getY_Pos,

getZoomablePanel, hasSubComponents, InitDrawing, isAutoScale, isDrawBadges,

isGroupIDValid, isObjectInsideBounds, isPlenumShaped, isPosnSet, isScalable,

isSegmentSet, isSelected, isValveShaped, loadDrawnComponent, mouseClicked, mouseDragged,

mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, moveRel, moveTo,

paint, paintComponent, print, readTemplateEntry, removeNotify, repositionLinks,

repositionLinks, resetPosition, restoreState, revTransformPoint, rotateTo, rotateTo,

scaleIt, setAutoScale, setBackupComponent, setBounds, setComponent, setDrawAngle,

setDrawBadges, setDrawHeight, setDrawWidth, setEqualTo, setGroupID, setGroupIDValid,

setLabelString, setLenScaleFactor, setOrientation, setOrientationByAngle,

setOrientationConstrained, setParent, setPixelsPerMeter, setSelected, setSizeTo,

setWidthScaleFactor, setX_Pos, setY_Pos, showConnections, store, storeState, toString,

translateConnectionToScreen, translatePointToScreen

Methods inherited from class javax.swing.JComponent

A-417
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-418
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-419
getTransferHandler

Methods inherited from interface java.awt.event.MouseListener

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased

Methods inherited from interface java.awt.event.MouseMotionListener

mouseDragged, mouseMoved

Methods inherited from interface javax.swing.undo.StateEditable

restoreState, storeState

Methods inherited from interface com.cafean.client.analysis.ComponentListener

componentChanged, componentConnected, componentDeleted, componentDisconnected

Methods inherited from interface com.cafean.client.ui.AnimationBeanGenerator

createDisplayBeans

Methods inherited from interface com.cafean.client.ui.util.Groupable

getGroupID, isGroupIDValid, setGroupID, setGroupIDValid

Fields

ID

public static final java.lang.String ID

string id used to identify the template type for a polygon bean

Constant value: DrawnViewComponent

Constructors

DrawnViewComponent

public DrawnViewComponent(AbstractComponent c)

Creates a new instance of DrawnComponentView

Methods

store

public com.apt.xdr.PibBlock store(int viewNum)

This function returns a PibBlock for a drawn component.

A-420
loadDrawnComponent

public void loadDrawnComponent(com.apt.xdr.PibBlock block)

This function loads a DrawnComponent from a DrawnComponentRec.

InitDrawing

public void InitDrawing()

Creates a draw view component and puts it in the drawing vectors.

isRepresenting

public boolean isRepresenting(int compid)

getConnectingPt

public ConnectingPt getConnectingPt(int compIdent,

 ConnectionData data)

findEmbedded

public DrawnEmbeddedConnection findEmbedded(DrawnEmbeddedConnection[] array,

 int comp,

 ConnectionData data)

hasSubComponents

public boolean hasSubComponents()

Returns true if this DrawnComponent has DrawnSubComponents contained within it

getSubComponentAt

public DrawnSubComponent getSubComponentAt(int x,

 int y)

Returns the sub-component at the given coordinates, or null of no sub-component exists at that location.

getCustomPopupItems

public Vector getCustomPopupItems()

Returns the custom popup items of this DrawnComponent's target component

A-421
draw

public void draw(java.awt.Graphics2D g,

 boolean selected)

Draw a simple X'd box if there is no image.

setBounds

public void setBounds(java.awt.Rectangle r)

getMinimumSize

public java.awt.Dimension getMinimumSize()

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)

storeState

public void storeState(Hashtable state)

Store the state of the bean to permit undo.

Parameters:

state - A hash table containing modified parameters.

restoreState

public void restoreState(Hashtable state)

Restore the state of the bean from an earlier edit.

Parameters:

state - A hash table containing modified parameters.

createTemplateEntry

public TemplateEntry createTemplateEntry()

A-422
Creates a new TemplateEntry for this DrawnComponent that stores all of the location and state data for this DranwComponent.

Any DrawnComponent that has unique data associated with it should store that data in an extension of TemplateEntry and

overwrite this method.

readTemplateEntry

public void readTemplateEntry(TemplateEntry entry)

Sets the data on this DrawnComponent from a TemplateEntry read in from a view template file. Any DrawnComponent that

has unique data associated with it should read that data in, assuming a TemplateEntry.

A-423
com.cafean.client.ui

Interface FullScreenDrawing

public interface FullScreenDrawing

extends 

An interface describing a visual DrawnComponent or Annotation extension who's size is always that of the BeanBox that contains it.

All Known Implementing Classes:

LineAnnotation

See Also:

DrawnConnection, LineAnnotation

Method Summary

java.awt.Rectangle getUsedBounds()

Retrieves the bounds actually used by this FullScreenDrawing.

void translate(int dx, int dy)

Translates this drawing by the given x and y deltas.

Methods

translate

public void translate(int dx,

 int dy)

Translates this drawing by the given x and y deltas.

getUsedBounds

public java.awt.Rectangle getUsedBounds()

Retrieves the bounds actually used by this FullScreenDrawing.

A-424
com.cafean.client.ui

Class GlassPanel

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JPanel

 |

 +-com.cafean.client.ui.GlassPanel

public class GlassPanel

extends JPanel

implements javax.accessibility.Accessible, java.io.Serializable, HasGetTransferHandler,

java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.awt.event.MouseListener

, java.awt.event.MouseMotionListener

A glass panel that rests on top of the bean box in a view This panel handles the rendering of the move, resize and rubberband

selection boxes. Using a glass panel allows lines to draw without requiring the components they pass over to redraw. This greatly

speeds up drawing rubberband lines and boxes. This class should only be used by DrawnViews.

All Implemented Interfaces:

java.awt.event.MouseMotionListener, java.awt.event.MouseListener, java.io.Serializable, java.awt.MenuContainer,

java.awt.image.ImageObserver, HasGetTransferHandler, java.io.Serializable, javax.accessibility.Accessible

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Constructor Summary

public GlassPanel()

The constructor for a new GlassPanel.

Method Summary

void clearRubberBoxes()

Clears all of the current rubberband selection boxes.

A-425
void deleteRubberBox()

Erases the existing rubberband selection box.

void deleteRubberBoxes()

Erase the current rubberband selection boxes.

void deleteRubberLine(java.awt.Point begin, java.awt.Point end)

Erases an existing line between two points.

void deleteRubberLines(Vector points, java.awt.Point last)

Erase the current rubberband connection lines.

void drawRubberBox(java.awt.Rectangle box)

Draws a rubberband box on the GlassPane that corrisponds to the given Rectangle coordinates

and size.

void drawRubberBoxes(java.awt.Rectangle[] boxes)

Drawns all the rubberband selection boxes.

void drawRubberLine(java.awt.Point begin, java.awt.Point end, java.awt.Point

oldPoint)

Draws the rubberband connection line between two given points.

void drawRubberLines(Vector points, java.awt.Point last, java.awt.Point

oldPoint)

Draw the rubberband connection lines

void forwardMouseEvent(java.awt.event.MouseEvent e)

Forward a mouse event to the current mouse target, setting it if necessary.

void forwardMouseEventToBeanBox(java.awt.event.MouseEvent e)

Forward a mouse event to the current mouse target, setting it if necessary.

AbstractComponent getConnectionSource()

Gets the AbstractComponent that started the connection.

java.awt.Dimension getMaximumSize()

Return the maximum size of this panel, which is one pixel larger then the BeanBox below it.

String getToolTipText(java.awt.event.MouseEvent event)

Returns the string to be used as the tooltip for event.

java.awt.Component locateComponentAt(int xpos, int ypos)

Locate a component at a specific position in the display.

java.awt.Component locateComponentAt(int xpos, int ypos, boolean returnChild)

Locate a component at a specific position in the display.

void mouseClicked(java.awt.event.MouseEvent orig_evt)

Proxies the given MouseEvent to the current MouseHandler

void mouseDragged(java.awt.event.MouseEvent orig_evt)

Proxies the given MouseEvent to the current MouseHandler

void mouseEntered(java.awt.event.MouseEvent orig_evt)

Proxies the given MouseEvent to the current MouseHandler

A-426
void mouseExited(java.awt.event.MouseEvent orig_evt)

Proxies the given MouseEvent to the current MouseHandler

void mouseMoved(java.awt.event.MouseEvent orig_evt)

Proxies the given MouseEvent to the current MouseHandler

void mousePressed(java.awt.event.MouseEvent orig_evt)

Proxies the given MouseEvent to the current MouseHandler

void mouseReleased(java.awt.event.MouseEvent orig_evt)

Proxies the given MouseEvent to the current MouseHandler

void paintComponent(java.awt.Graphics g)

Repaint the glasspane.

void removeNotify()

Overriden here to unregister from the tooltip manager

void repaint(long tm, int x, int y, int width, int height)

When repainting a region, add a buffer of 10 pixels all the way region to make sure that all

connection bands repaint as well

boolean requiresTarget()

Determines if a target ConnectingPt is required for the current Connection.

Methods inherited from class javax.swing.JPanel

getAccessibleContext, getUI, getUIClassID, setUI, updateUI

Methods inherited from class javax.swing.JComponent

A-427
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-428
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-429
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface java.awt.event.MouseListener

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased

Methods inherited from interface java.awt.event.MouseMotionListener

mouseDragged, mouseMoved

Constructors

GlassPanel

public GlassPanel()

The constructor for a new GlassPanel. This sets all of the default values on the GlassPanel.

Methods

removeNotify

public void removeNotify()

Overriden here to unregister from the tooltip manager

getToolTipText

public String getToolTipText(java.awt.event.MouseEvent event)

Returns the string to be used as the tooltip for event. If the mouse is hovering over a DrawnComponent, that

DrawnComponent's name is used.

Parameters:

event - the MouseEvent generated by the ToolTipManager.

Returns:

the name of this DrawnComponent's Component.

getMaximumSize

public java.awt.Dimension getMaximumSize()

Return the maximum size of this panel, which is one pixel larger then the BeanBox below it.

Returns:

the Dimension containing the maximum size of the panel.

A-430
drawRubberLines

public void drawRubberLines(Vector points,

 java.awt.Point last,

 java.awt.Point oldPoint)

Draw the rubberband connection lines

Parameters:

points - the Vector of points for the line.

last - the Point added before the current position.

oldPoint - the previous location of the mouse, needed for removing the previous line.

deleteRubberLines

public void deleteRubberLines(Vector points,

 java.awt.Point last)

Erase the current rubberband connection lines.

Parameters:

points - the Vector of points in the line.

last - the last fixed anchor point.

drawRubberLine

public void drawRubberLine(java.awt.Point begin,

 java.awt.Point end,

 java.awt.Point oldPoint)

Draws the rubberband connection line between two given points. Before the new line is drawn, the line that already exists to

the old point is drawn again, with the background color, erasing it.

Parameters:

begin - the Point where the line begins.

end - the Point where the line ends.

oldPoint - the previous endpoint.

deleteRubberLine

public void deleteRubberLine(java.awt.Point begin,

 java.awt.Point end)

Erases an existing line between two points.

Parameters:

begin - the Point where the line begins.

end - the Point where the line ends.

drawRubberBox

public void drawRubberBox(java.awt.Rectangle box)

Draws a rubberband box on the GlassPane that corrisponds to the given Rectangle coordinates and size.

A-431
Parameters:

box - the Rectangle for the rubberband box.

deleteRubberBox

public void deleteRubberBox()

Erases the existing rubberband selection box.

drawRubberBoxes

public void drawRubberBoxes(java.awt.Rectangle[] boxes)

Drawns all the rubberband selection boxes. This is used to draw a red selection box around all of the currently selected

components.

Parameters:

boxes - the Rectangle[].

clearRubberBoxes

public void clearRubberBoxes()

Clears all of the current rubberband selection boxes. This does not actually erase the rubberbands, this just removes the

reference to the previously drawn boxes.

deleteRubberBoxes

public void deleteRubberBoxes()

Erase the current rubberband selection boxes.

mousePressed

public void mousePressed(java.awt.event.MouseEvent orig_evt)

Proxies the given MouseEvent to the current MouseHandler

Parameters:

orig_evt - the MouseEvent being proxied to the MouseHandler

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent orig_evt)

Proxies the given MouseEvent to the current MouseHandler

Parameters:

orig_evt - the MouseEvent being proxied to the MouseHandler

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent orig_evt)

A-432
Proxies the given MouseEvent to the current MouseHandler

Parameters:

orig_evt - the MouseEvent being proxied to the MouseHandler

mouseExited

public void mouseExited(java.awt.event.MouseEvent orig_evt)

Proxies the given MouseEvent to the current MouseHandler

Parameters:

orig_evt - the MouseEvent being proxied to the MouseHandler

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent orig_evt)

Proxies the given MouseEvent to the current MouseHandler

Parameters:

orig_evt - the MouseEvent being proxied to the MouseHandler

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent orig_evt)

Proxies the given MouseEvent to the current MouseHandler

Parameters:

orig_evt - the MouseEvent being proxied to the MouseHandler

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent orig_evt)

Proxies the given MouseEvent to the current MouseHandler

Parameters:

orig_evt - the MouseEvent being proxied to the MouseHandler

forwardMouseEvent

public void forwardMouseEvent(java.awt.event.MouseEvent e)

Forward a mouse event to the current mouse target, setting it if necessary.

Parameters:

e - The mouse event to be forwarded.

forwardMouseEventToBeanBox

public void forwardMouseEventToBeanBox(java.awt.event.MouseEvent e)

A-433
Forward a mouse event to the current mouse target, setting it if necessary.

Parameters:

e - The mouse event to be forwarded.

repaint

public void repaint(long tm,

 int x,

 int y,

 int width,

 int height)

When repainting a region, add a buffer of 10 pixels all the way region to make sure that all connection bands repaint as well

Parameters:

tm - this parameter is not used

x - the x value of the dirty region

y - the y value of the dirty region

width - the width of the dirty region

height - the height of the dirty region

See Also:

Component.isShowing()

RepaintManager.addDirtyRegion(javax.swing.JComponent, int, int, int, int)

paintComponent

public void paintComponent(java.awt.Graphics g)

Repaint the glasspane. Draw the selection and drag rectangles around each selected component.

Parameters:

g - the Graphics object.

locateComponentAt

public java.awt.Component locateComponentAt(int xpos,

 int ypos)

Locate a component at a specific position in the display.

Parameters:

xpos - The x coordinate.

ypos - The y coordinate.

Returns:

The component located at the given coordinate, or null if none found.

locateComponentAt

public java.awt.Component locateComponentAt(int xpos,

 int ypos,

 boolean returnChild)

Locate a component at a specific position in the display.

A-434
Parameters:

xpos - The x coordinate.

ypos - The y coordinate.

returnChild - if true, this will return the child component at the give coordinates.

Returns:

The component located at the given coordinate, or null if none found.

requiresTarget

public boolean requiresTarget()

Determines if a target ConnectingPt is required for the current Connection.

getConnectionSource

public AbstractComponent getConnectionSource()

Gets the AbstractComponent that started the connection.

A-435
com.cafean.client.ui

Class LocalSubmitDialog

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-java.awt.Window

 |

 +-java.awt.Dialog

 |

 +-javax.swing.JDialog

 |

 +-com.cafean.client.ui.LocalSubmitDialog

public class LocalSubmitDialog

extends JDialog

This dialog allows the user to submit a job to a local calculation server. Since the local calculation server is not associated with a

database, the user cannot input any kind of identifier for the runs. 

Plugin and context specific extensions of this class should take note of updateRunOptions(RunOptions, File, File) for use in

sending parameters, options or files to the the analysis code.

All Implemented Interfaces:

java.io.Serializable, java.awt.MenuContainer, java.awt.image.ImageObserver, javax.accessibility.Accessible,

HasGetTransferHandler, RootPaneContainer, javax.accessibility.Accessible, WindowConstants

Fields inherited from class java.awt.Dialog

DEFAULT_MODALITY_TYPE

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

Fields inherited from interface javax.swing.WindowConstants

DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE

Constructor Summary

public LocalSubmitDialog(java.awt.Frame parent, org.omg.CORBA.ORB theOrb, String

cType, java.io.File file)

Creates a new LocalSubmitDialog for use in submitting an input deck to a Calculation Server.

A-436
public LocalSubmitDialog(java.awt.Frame parent, org.omg.CORBA.ORB theOrb, String

cType, AbstractModel theModel)

Creates a new LocalSubmitDialog for use in submitting an input deck and MED format model

to a Calculation Server.

Method Summary

static

com.cafean.CalcServer

.command.AsciiFileEle

ment

createAsciiFileElement(String name, java.io.File file)

Creates a new AsciiFileElement with the given name from the content of the given file.

static

com.cafean.CalcServer

.command.BinaryFileEl

ement

createBinaryFileElement(String name, java.io.File file)

Creates a new BinaryFileElement with the given from the content of the given file.

String getCalcType()

JPanel getCustomPanel()

Retrieves the empty custom panel located just above the console check box that can be used to

include custom UI objects.

String getLastJobPath()

Returns the folder path (on the server) of the last job submitted by this dialog.

String getLastJobUrl()

Returns the full URL to the last job submitted by this dialog.

int getLastSubmittedRun()

Returns the current DB_ID of the last job submitted by this dialog.

String getServer()

void setRunOptions(com.cafean.CalcServer.command.RunOptions[] options)

Sets the Run Options passed to LaunchCalc when a job is sumitted.

void setServer(String name)

void setVisible(boolean visible)

void useRestartFile(String file)

void useRestartJob(String job)

Methods inherited from class javax.swing.JDialog

getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane,

getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler,

isDefaultLookAndFeelDecorated, remove, repaint, setContentPane,

setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar,

setLayeredPane, setLayout, setTransferHandler, update

A-437
Methods inherited from class java.awt.Dialog

addNotify, getAccessibleContext, getModalityType, getTitle, hide, isModal, isResizable,

isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated,

setVisible, show, toBack

Methods inherited from class java.awt.Window

addNotify, addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener,

addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle,

createBufferStrategy, createBufferStrategy, dispose, getAccessibleContext,

getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner,

getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext,

getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner,

getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString,

getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide,

isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot,

isFocused, isLocationByPlatform, isShowing, pack, postEvent, removeNotify,

removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape,

setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState,

setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform,

setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize,

setVisible, show, toBack, toFront

Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-438
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.accessibility.Accessible

A-439
getAccessibleContext

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface javax.swing.RootPaneContainer

getContentPane, getGlassPane, getLayeredPane, getRootPane, setContentPane, setGlassPane,

setLayeredPane

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

getTransferHandler

Constructors

LocalSubmitDialog

public LocalSubmitDialog(java.awt.Frame parent,

 org.omg.CORBA.ORB theOrb,

 String cType,

 java.io.File file)

Creates a new LocalSubmitDialog for use in submitting an input deck to a Calculation Server.

Parameters:

parent - the JFrame parent used for modality.

theOrb - the ORB (CORBA Object Request Broker) used by the application

cType - a String containing the calculation type, must match a registered plugin's ID.

file - the File being submitted for execution.

LocalSubmitDialog

public LocalSubmitDialog(java.awt.Frame parent,

 org.omg.CORBA.ORB theOrb,

 String cType,

 AbstractModel theModel)

Creates a new LocalSubmitDialog for use in submitting an input deck and MED format model to a Calculation Server.

Parameters:

parent - the JFrame parent used for modality.

theOrb - the ORB (CORBA Object Request Broker) used by the application

cType - a String containing the calculation type, must match a registered plugin's ID.

theModel - the AbstractModel being submitted for execution.

Methods

A-440
setVisible

public void setVisible(boolean visible)

getLastSubmittedRun

public int getLastSubmittedRun()

Returns the current DB_ID of the last job submitted by this dialog.

getLastJobPath

public String getLastJobPath()

Returns the folder path (on the server) of the last job submitted by this dialog.

getLastJobUrl

public String getLastJobUrl()

Returns the full URL to the last job submitted by this dialog.

getCustomPanel

public JPanel getCustomPanel()

Retrieves the empty custom panel located just above the console check box that can be used to include custom UI objects.

Parameters:

a - javax.swing.JPanel with default properties.

setRunOptions

public void setRunOptions(com.cafean.CalcServer.command.RunOptions[] options)

Sets the Run Options passed to LaunchCalc when a job is sumitted.

useRestartFile

public void useRestartFile(String file)

useRestartJob

public void useRestartJob(String job)

A-441
createAsciiFileElement

public static com.cafean.CalcServer.command.AsciiFileElement

createAsciiFileElement(String name,

 java.io.File file)

Creates a new AsciiFileElement with the given name from the content of the given file. If the file is large enough (16k) it will

be compressed and the "compressed" property of the element set to true.

Parameters:

name - a String containing the "Key" or "Name" of the file element.

file - a File referring to the file to be read in.

Returns:

an AsciiFileElement containing the given file.

createBinaryFileElement

public static com.cafean.CalcServer.command.BinaryFileElement

createBinaryFileElement(String name,

 java.io.File file)

Creates a new BinaryFileElement with the given from the content of the given file. If the file is large enough (16k) it will be

compressed and the "compressed" property of the element set to true.

Parameters:

name - a String containing the "Key" or "Name" of the file element.

file - a File referring to the file to be read in.

Returns:

a BinaryFileElement containing the given file.

getCalcType

public String getCalcType()

setServer

public void setServer(String name)

getServer

public String getServer()

A-442
com.cafean.client.ui

Class MainFrame

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-java.awt.Window

 |

 +-java.awt.Frame

 |

 +-javax.swing.JFrame

 |

 +-com.cafean.client.ui.MainFrame

public class MainFrame

extends JFrame

implements WindowConstants, javax.accessibility.Accessible, RootPaneContainer, HasGetTransferHandler

, java.awt.MenuContainer, javax.accessibility.Accessible, java.awt.image.ImageObserver,

java.awt.MenuContainer, java.io.Serializable, SplashListener, BatchProcessor,

java.awt.datatransfer.ClipboardOwner, SDITopFrame

The MainFrame is the central main class for the ModelEditor.

All Implemented Interfaces:

SDITopFrame, java.awt.datatransfer.ClipboardOwner, BatchProcessor, SplashListener, java.io.Serializable,

java.awt.MenuContainer, java.awt.image.ImageObserver, javax.accessibility.Accessible, java.awt.MenuContainer,

HasGetTransferHandler, RootPaneContainer, javax.accessibility.Accessible, WindowConstants

Field Summary

public static debug

Display all debug information to the standard output

public static instance

This is a static reference to the current instance of the ModelEditor.

public static final MODE_CLEAR_CONSTANTS

THis is clears constant references in clone

Value: 3

public static final MODE_EXPORT_ASCII

This is exporting an ASCII file mode

Value: 2

public static final MODE_EXPORT_ASCII_EXPLICIT

This is exporting an ASCII file mode that writes out all numerics as numbers

Value: 5

A-443
public static final MODE_IMPORT

This clips all values less then -1e30 to -1e29

Value: 4

public static final MODE_NORMAL

This is normal operational mode

Value: 0

public static final MODE_SAVE_MED

This is saving a MED file mode

Value: 1

public static final SELECTOR_OPEN

A file selector mode for openFileSelector that indicates an Open type

Value: 1

public static final SELECTOR_SAVE

A file selector mode for openFileSelector that indicates a Save type

Value: 2

Fields inherited from class javax.swing.JFrame

EXIT_ON_CLOSE

Fields inherited from class java.awt.Frame

CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH,

MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL,

NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR,

W_RESIZE_CURSOR, WAIT_CURSOR

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

Fields inherited from interface javax.swing.WindowConstants

DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE

Constructor Summary

public MainFrame(boolean showSplash)

This constructs a new instance of the ModelEditor.

Method Summary

static void addAbstractModel(AbstractModel model)

Adds a new AbstractModel to the ModelEditor.

A-444
static void addAbstractModel(AbstractModel model, String label)

Adds a new AbstractModel to the model editor.

static void addClassificationListener(ClassificationListener listener)

adds the given ClassificationListener to the list of listeners notified when the current

Classification level changes.

static void addContextHelp(java.awt.Component comp, String label)

Adds a component to the context sensitive help, with the given label.

void addDockablePanel(DockablePanel panel)

Adds the given panel to the pane holding all DockablePanels.

static void addExportItem(JMenuItem item)

This inserts a new export option into the export menu.

static void addImportItem(JMenuItem item)

This inserts a new import option into the import menu.

static void addMenuItem(JMenuItem item, String name)

This is used to add a new menu item to the model editor main frame menu bar.

static int addMessage(String text)

Adds a new message to the MessageWindow.

static void addMessage(String text, AbstractComponent comp)

Adds the given text to the message window as a notice associated with the given component.

static void addMessage(String text, AbstractComponent comp, int severityCode)

Adds the given text as a message to the message window associated with the given component

static void addMessage(String text, GenericObject comp, int severityCode)

Adds the given text as a message to the message window associated with the given

GenericObject.

static int addMessage(String text, int severityCode)

Adds the given text as a message to the message window with the given severity code chosen

from those in MessageWindow.

static void addMessage(String summary, String body, Object[] elements, int

severityCode)

static void addMessage(String text, Vector comps, int severityCode)

Adds the given text as a multi-line message to the message window associated with the given

components.

static void addMessage(String text, ViewComponent view, JComponent uiComp, int

severityCode)

Adds the given text as a message to the Message Window associated with the given

ViewComponent for the given GUI Component.

static void addModelNavigationShortcut(JComponent comp)

Adds a shortcut to the input/action maps of the given component used to display the

ModelSelectionPopup.

A-445
void addPlaybackControl(com.cafean.client.anim.PlaybackControl control)

Adds the given playback control to the list of controls updated in

updatePlaybackButtons()

void addPlaybackPanel(com.cafean.client.anim.PlaybackButtonPanel panel)

Adds the given playback panel to the list of controls updated in updatePlaybackButtons()

static void addRegisteredDialog(java.awt.Dialog dialog, AbstractModel model)

Adds the given dialog to the MainFrame's list of registered child dialogs.

static void addRegisteredFrame(java.awt.Frame frame, AbstractModel model)

Adds the given frame to the MainFrame's list of registered frames.

static void addSound(int unused)

Deprecated. 0.26.1

static void appendExportItems(JMenu export)

static void appendToolsItems(JMenu tools)

static void clearCheckErrors()

Sets the Message Window's error count beginning index to the number of messages currently

in the table so that they will not be counted as errors or warnings in subsequent getErrorCount

or getWarningCount calls.

static void clearCheckWarnings()

Sets the Message Window's warning count beginning index to the number of messages

currently in the table so that they will not be counted as errors or warnings in subsequent

getErrorCount or getWarningCount calls.

void closeAbstractModel(AbstractModel model)

Closes the given AbsractModel.

void closeMessageWindow()

Closes the MessageWindow from an external source.

void createModel(MECodePlugin plugin)

Creates a new AbstractModel for the given plugin.

static String dateStamp()

Gets a string that contains the current date.

static void deactivateRedoButtons()

disables the undoButton and redoButton

static void disableMainFrame()

Disables all mouse events for this MainFrame.

static void displayModelReport(AbstractModel model)

Displays a model report dialog if the given model implements ModelReportBuilder.

static void enableMainFrame()

Deactivates this MainFrame's glass pane thus allowing mouse events to pass through to the

underlying components.

A-446
static

ClientCodePlugin

findClientPlugin(String id)

Finds a client plugin by its ID.

static AbstractModel findModelByIdent(int ident)

This finds the AbstractModel with the given ident.

static MEPlugin findPlugin(String id)

Finds a plugin by its ID.

static AbstractModel getAbstractModelAt(int index)

Returns the AbstractModel at a specified index.

static int getAbstractModelCount()

Returns the number of models currently inside the calculation project.

static

ClientCodePlugin

getClientPluginAt(int index)

Returns the plugin at the specified index into the client plugins vector.

static int getClientPluginCount()

Returns the number of client plugins currently loaded.

static

java.awt.datatransfer

.Clipboard

getClipboard()

static MECodePlugin[] getCodePlugins()

This returns all of the plugins currently loaded that extend MECodePlugin.

static AbstractModel getCurrentModel()

This returns the AbstractModel that, of the list of currenly open models, is currently being

worked on.

DockablePanel[] getDockablePanels(AbstractModel model)

Retrieves the dockable panels available for the given model.

static

MEFeaturePlugin[]

getFeaturePlugins()

Returns an array of all the MEFeaturePlugins that are currently loaded.

static

MEFeaturePlugin[]

getFeaturePlugins(AbstractModel model)

Finds all of the feature plugins that have data that needs to be stored along with the given

model.

static FileChooser getFileChooser()

Gives access to a FileChooser for selecting a file.

static int getMode()

Getter for property mode.

static AbstractModel getModel(String label)

This finds the AbstractModel from the list of open models that has been stored under a given

label.

static int getNumberOfErrorsFound()

Retrieves the number of error messages in the message window.

A-447
static int getNumberOfWarningsFound()

Retrieves the number of warning messages in the message window.

org.omg.CORBA.ORB getOrb()

Gets the current CORBA orb.

PDFViewer getPdfViewer()

Getter for property pdfViewer.

static MEPlugin getPluginAt(int index)

Returns the plugin at the specified index into the plugins vector.

static int getPluginCount()

Retursn the number of plugins currently loaded.

SnapPreferences getPrefs()

Getter for the SnapPreferences object.

static AbstractModel getReferenceModel(AbstractModel model)

Retrieves the reference model for the given model if one has been loaded.

static Iterator getRegisteredDialogs()

Returns an unmodifiable List of the registered dialogs.

static Iterator getRegisteredDialogs(AbstractModel model)

Returns an unmodifiable List of the registered dialogs for a given model

static Iterator getRegisteredFrames()

Returns an unmodifiable List of the registered Frames.

static Iterator getRegisteredFrames(AbstractModel model)

Returns an unmodifiable List of the registered Frames for a given model

static java.io.File getSnapHomeDirectory()

Returns the installation directory for CAFEAN.

int getSplashStatus()

String getSplashTitle()

SnapUndoManager getUndoManager()

Deprecated. As of version 0.28.0, replaced by AbstractModel.getUndoManager().

UndoableEditSupport getUndoSupport()

Deprecated. As of version 0.28.0, replaced by

AbstractModel.postEdit(UndoableEdit).

String getUserName()

Gets the current user id.

static String getValidLabel(String label)

Returns a valid key string for the user defined key passed in.

A-448
Version getVersion()

This gets the Version information for this instance of the ModelEditor.

void initializeDataSources()

Loads Custom data sources from client code plug-ins that implement the IncludesDataSource

interface.

static boolean isJava3DAvailable()

Returns true if the Java3D libraries are available in the current classloader's classpath.

static boolean isPluginEnabled(MECodePlugin plugin)

Returns the enabled state of the given MECodePlugin.

static boolean isPluginInUse(MECodePlugin plugin)

Determines if the given MECodePlugin is currently in use by the ModelEditor.

boolean isSelectedDockablePanel(DockablePanel panel)

Returns a true if the given DockablePanel is the selected panel for the indicated model.

static boolean isValidLabel(String label)

Determines if the given label is text that can be processed as a valid model label.

static void loadReferenceModel(AbstractModel model, java.io.File file)

Loads the reference model for the given model from the given file.

void lostOwnership(java.awt.datatransfer.Clipboard clipboard,

java.awt.datatransfer.Transferable contents)

The ClipboardOwner inferface routine.

static void main(String[] args)

This is the main function for the ModelEditor.

static void offsetWindowLocation(java.awt.Window childWindow)

Offsets the given childWindow from other windows of the same type so that they do not

overlap each other perfectly, hiding one another.

java.io.File openFileSelector(String title, int selectorType)

Opens a JFileChooser of the appropriate type configured with the given title and an appropriate

button name and returns either the selected file or null on failure.

static void openMessageArea()

Opens the MessageWindow, and updates the checkbox menu item for the MessageWindow to

show that it is open.

static AbstractModel openModelMED(java.io.File file, boolean prompt, String key)

Opens the given MED file on the current thread.

boolean processCommand(String command)

static void refreshSteamTable()

Refreshes the loaded steam tables.

static void removeAbstractModel(AbstractModel model)

Removes a AbstractModel from the model editor.

A-449
static void removeClassificationListener(ClassificationListener listener)

removes the given ClassificationListener from the list of listeners notified when the current

Classification level changes.

void removeDockablePanel(DockablePanel panel)

Removes the given panel from the pane holding all DockablePanels.

void removeExcessRecents()

void removePlaybackControl(com.cafean.client.anim.PlaybackControl control)

Removes the given playback control from the list of controls updated in

updatePlaybackButtons()

void removePlaybackPanel(com.cafean.client.anim.PlaybackButtonPanel panel)

Removes the given playback panel from the list of controls updated in

updatePlaybackButtons()

static void removeRegisteredDialog(java.awt.Dialog dialog, AbstractModel model)

Removes the given dialog from the MainFrame's list of registered child dialogs.

static void removeRegisteredFrame(java.awt.Frame frame, AbstractModel model)

Removes the given Frame from the MainFrame's list of registered frames.

boolean requestSaveFileName(AbstractModel model)

Opens a file selection dialog for specifying the target location of a MED file.

static void resetAllUnits(int units)

Resets all the renderers for units inside the model editor.

static void resetCursor()

Sets the cursor to the default cursor when the process requiring the waiting is complete.

void resetMenus()

Resets the menus on the main toolbar of the MainFrame.

void resetWindowingMode()

Updates and resets all Window Arrangement based on the current status.

void setChildLocation(java.awt.Window childWindow)

Sets the given window's location to be that of the center of this main frame's current screen.

void setCurrentModel(AbstractModel m)

This sets the AbstractModel from the list of open models that currently is being worked on.

static void setFileChooserLocation(JFileChooser dlg)

Sets the given JFileChooser's location to be the center of the main frame's current screen.

static void setMode(int mode_)

Setter for property mode.

static void setPlaybackTime(String mess)

Sets the currently display status message

static void setPluginEnabled(MECodePlugin plugin, boolean enabled)

Sets whether a given property is enabled or not.

A-450
void setSelectedDockablePanel(DockablePanel panel)

void setSplashStatus(int stat)

void setUserName(String name)

Sets the current user id.

void setVisible(boolean visible)

Shows or hides this MainFrame.

static void setWaitCursor()

Sets the cursor to a cursor indicating the user should wait for a process before continuing.

static void setWindowLocation(java.awt.Window window)

Sets the given window's location to be that of the center of this main frame's current screen.

static void showCreateDialog()

Attempts to create and add a new model by prompting the user with the list of available

plugins.

static void showOpenDialog()

This event is called when the user wants to open a localy stored SAM file.

static void submitModel(AbstractModel model, boolean local)

Submits the given model for execution using its plug-in specific submitModel method.

static void updateClassification()

Updates the current classification level based on the currently open models.

void updatePlaybackButtons()

Enables or disables the pause, play and time buttons based on the current state of the Source

Manger and it's master run.

Methods inherited from class javax.swing.JFrame

getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane,

getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler,

isDefaultLookAndFeelDecorated, remove, repaint, setContentPane,

setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage,

setJMenuBar, setLayeredPane, setLayout, setTransferHandler, update

Methods inherited from class java.awt.Frame

addNotify, getAccessibleContext, getCursorType, getExtendedState, getFrames,

getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable,

isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage,

setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated

Methods inherited from class java.awt.Window

A-451
addNotify, addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener,

addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle,

createBufferStrategy, createBufferStrategy, dispose, getAccessibleContext,

getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner,

getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext,

getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner,

getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString,

getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide,

isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot,

isFocused, isLocationByPlatform, isShowing, pack, postEvent, removeNotify,

removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape,

setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState,

setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform,

setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize,

setVisible, show, toBack, toFront

Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-452
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.accessibility.Accessible

A-453
getAccessibleContext

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface javax.swing.RootPaneContainer

getContentPane, getGlassPane, getLayeredPane, getRootPane, setContentPane, setGlassPane,

setLayeredPane

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

getTransferHandler

Methods inherited from interface com.cafean.utils.SplashListener

getSplashStatus, getSplashTitle, getVersion, setSplashStatus

Methods inherited from interface com.cafean.utils.BatchProcessor

processCommand

Methods inherited from interface java.awt.datatransfer.ClipboardOwner

lostOwnership

Methods inherited from interface com.cafean.utils.SDITopFrame

setChildLocation

Fields

instance

public static com.cafean.client.ui.MainFrame instance

This is a static reference to the current instance of the ModelEditor.

debug

public static boolean debug

Display all debug information to the standard output

A-454
SELECTOR_OPEN

public static final int SELECTOR_OPEN

A file selector mode for openFileSelector that indicates an Open type

Constant value: 1

SELECTOR_SAVE

public static final int SELECTOR_SAVE

A file selector mode for openFileSelector that indicates a Save type

Constant value: 2

MODE_NORMAL

public static final int MODE_NORMAL

This is normal operational mode

Constant value: 0

MODE_SAVE_MED

public static final int MODE_SAVE_MED

This is saving a MED file mode

Constant value: 1

MODE_EXPORT_ASCII

public static final int MODE_EXPORT_ASCII

This is exporting an ASCII file mode

Constant value: 2

MODE_CLEAR_CONSTANTS

public static final int MODE_CLEAR_CONSTANTS

THis is clears constant references in clone

Constant value: 3

MODE_IMPORT

public static final int MODE_IMPORT

This clips all values less then -1e30 to -1e29

Constant value: 4

MODE_EXPORT_ASCII_EXPLICIT

public static final int MODE_EXPORT_ASCII_EXPLICIT

This is exporting an ASCII file mode that writes out all numerics as numbers

Constant value: 5

A-455
Constructors

MainFrame

public MainFrame(boolean showSplash)

This constructs a new instance of the ModelEditor. The new instance can be accessed from the public static reference

instance. As the main controller class for the ModelEditor, this reads in all the plugins, loads all user preferences, and returns

the ModelEditor to the visual state of the last time the user closed the ModelEditor.

Parameters:

showSplash - the boolean that is TRUE if the splashscreen should be shown.

Methods

getClipboard

public static java.awt.datatransfer.Clipboard getClipboard()

resetWindowingMode

public void resetWindowingMode()

Updates and resets all Window Arrangement based on the current status.

addDockablePanel

public void addDockablePanel(DockablePanel panel)

Adds the given panel to the pane holding all DockablePanels.

Parameters:

panel - the DockablePanel to add

removeDockablePanel

public void removeDockablePanel(DockablePanel panel)

Removes the given panel from the pane holding all DockablePanels.

Parameters:

panel - the DockablePanel to remove

getDockablePanels

public DockablePanel[] getDockablePanels(AbstractModel model)

Retrieves the dockable panels available for the given model.

Returns:

a DockablePanel[] containing the given model's panels.

A-456
isSelectedDockablePanel

public boolean isSelectedDockablePanel(DockablePanel panel)

Returns a true if the given DockablePanel is the selected panel for the indicated model. Returns false otherwise.

setSelectedDockablePanel

public void setSelectedDockablePanel(DockablePanel panel)

setSplashStatus

public void setSplashStatus(int stat)

getSplashStatus

public int getSplashStatus()

getSplashTitle

public String getSplashTitle()

getVersion

public Version getVersion()

This gets the Version information for this instance of the ModelEditor.

Returns:

the Version that contains the current release information.

displayModelReport

public static void displayModelReport(AbstractModel model)

Displays a model report dialog if the given model implements ModelReportBuilder. For other models,

AbstractModel.checkModel() is called to display model check messages to the MessageWindow.

Parameters:

model - the AbstractModel for which to display a model report.

closeMessageWindow

public void closeMessageWindow()

A-457
Closes the MessageWindow from an external source. This ensures that when the MessageWindow is closed, the menu item is

updated to show that the MessageWindow is not currently visible.

See Also:

MessageWindow

closeAbstractModel

public void closeAbstractModel(AbstractModel model)

Closes the given AbsractModel. Closes all the dialog windows for that model, removes it from the Navigator, and frees all the

data for garbage collection.

Parameters:

model - the AbstractModel to be closed.

getCurrentModel

public static AbstractModel getCurrentModel()

This returns the AbstractModel that, of the list of currenly open models, is currently being worked on.

Returns:

the AbstractModel that is currently being edited.

setCurrentModel

public void setCurrentModel(AbstractModel m)

This sets the AbstractModel from the list of open models that currently is being worked on.

Parameters:

m - the AbstractModel.

getModel

public static AbstractModel getModel(String label)

This finds the AbstractModel from the list of open models that has been stored under a given label.

Parameters:

label - the String label given by the user.

Returns:

the AbstractModel stored with the given label.

getUndoManager

public SnapUndoManager getUndoManager()

Deprecated. As of version 0.28.0, replaced by AbstractModel.getUndoManager().

Retrieves the SnapUndoManager handling the undo/redo stack for the current model. NOTE: Most uses of this method

should instead use AbstractModel.postEdit(UndoableEdit) as of version 0.28.0.

A-458
Returns:

the SnapUndoManager handling the current model or null.

getUndoSupport

public UndoableEditSupport getUndoSupport()

Deprecated. As of version 0.28.0, replaced by AbstractModel.postEdit(UndoableEdit).

Accessor for the UndoableEditSupport for the ModelEditor.

Returns:

an UndoableEditSupport wrapping the postEdit method for the current model.

resetAllUnits

public static void resetAllUnits(int units)

Resets all the renderers for units inside the model editor.

showCreateDialog

public static void showCreateDialog()

Attempts to create and add a new model by prompting the user with the list of available plugins.

createModel

public void createModel(MECodePlugin plugin)

Creates a new AbstractModel for the given plugin. This also creats a new ViewComponent for the model, and opens it.

processCommand

public boolean processCommand(String command)

showOpenDialog

public static void showOpenDialog()

This event is called when the user wants to open a localy stored SAM file.

Parameters:

event - the ActionEvent that fired this action.

openModelMED

public static AbstractModel openModelMED(java.io.File file,

 boolean prompt,

 String key)

A-459
Opens the given MED file on the current thread. This method must not be called from the Swing event thread.

WARNING: After loading the model from the given file the following two methods will be invoked from the Swing event

thread:

• AbstractModel.executeUserDefinedFunctions()

• AbstractModel.validateAllComponents()

Parameters:

file - a File refering to the MED file containing the model to open

prompt - if true the user will be prompted with pop-up dialogs for errors and interaction; if false messages will be output

to the message window to describe any error conditions or status changes.

key - a String containing the model key that will be used to reference the model after it has been opened. This key is of

the form "M[0-9]" (e.g. "M3"). This parameter may be null.

Returns:

the newly opened model or null

requestSaveFileName

public boolean requestSaveFileName(AbstractModel model)

Opens a file selection dialog for specifying the target location of a MED file. This is used when saving a model for the first

time, or when using the Save As option.

Parameters:

model - the AbstractModel that is being saved.

Returns:

TRUE unless the user cancells the file selection.

getNumberOfErrorsFound

public static int getNumberOfErrorsFound()

Retrieves the number of error messages in the message window.

Returns:

the int number of errors from the most recent error check.

getNumberOfWarningsFound

public static int getNumberOfWarningsFound()

Retrieves the number of warning messages in the message window.

Returns:

the int number of warnings from the most recent error check.

addSound

public static void addSound(int unused)

A-460
Deprecated. 0.26.1

This method does nothing as sounds are not supported by the ModelEditor.

addMessage

public static int addMessage(String text)

Adds a new message to the MessageWindow.

Parameters:

text - the String to be added to the MessageWindow.

Returns:

the return flag from adding a message to the MessageWindow.

See Also:

MessageWindow

addMessage

public static int addMessage(String text,

 int severityCode)

Adds the given text as a message to the message window with the given severity code chosen from those in MessageWindow.

Parameters:

text - the String to be added to the MessageWindow

severityCode - the MessageWindow based enumeration for the type of message.

Returns:

the int return flag from the MessageWindow.

See Also:

MessageWindow

addMessage

public static void addMessage(String text,

 AbstractComponent comp)

Adds the given text to the message window as a notice associated with the given component.

Parameters:

text - the String to be added to the MessageWindow

comp - the AbstractComponent.

See Also:

MessageWindow

A-461
addMessage

public static void addMessage(String text,

 AbstractComponent comp,

 int severityCode)

Adds the given text as a message to the message window associated with the given component

Parameters:

text - the String to be added to the MessageWindow

comp - the AbstractComponent.

severityCode - the severity code chosen from those in MessageWindow.

See Also:

MessageWindow

addMessage

public static void addMessage(String text,

 ViewComponent view,

 JComponent uiComp,

 int severityCode)

Adds the given text as a message to the Message Window associated with the given ViewComponent for the given GUI

Component.

Parameters:

text - the String to be added to the MessageWindow

view - the ViewComponent

uiComp - the JComponent that the given message refers to

severityCode - the severity code chosen from those in MessageWindow.

See Also:

MessageWindow

addMessage

public static void addMessage(String text,

 GenericObject comp,

 int severityCode)

Adds the given text as a message to the message window associated with the given GenericObject.

Parameters:

text - the String to be added to the MessageWindow

comp - the GenericObject.

severityCode - the severity code chosen from those in MessageWindow.

See Also:

MessageWindow

addMessage

public static void addMessage(String text,

 Vector comps,

 int severityCode)

A-462
Adds the given text as a multi-line message to the message window associated with the given components.

Parameters:

text - the String to be added to the MessageWindow

comps - the Vector of components.

severityCode - the severity code chosen from those in MessageWindow.

See Also:

MessageWindow

addMessage

public static void addMessage(String summary,

 String body,

 Object[] elements,

 int severityCode)

openMessageArea

public static void openMessageArea()

Opens the MessageWindow, and updates the checkbox menu item for the MessageWindow to show that it is open.

clearCheckErrors

public static void clearCheckErrors()

Sets the Message Window's error count beginning index to the number of messages currently in the table so that they will not

be counted as errors or warnings in subsequent getErrorCount or getWarningCount calls.

clearCheckWarnings

public static void clearCheckWarnings()

Sets the Message Window's warning count beginning index to the number of messages currently in the table so that they will

not be counted as errors or warnings in subsequent getErrorCount or getWarningCount calls.

getAbstractModelAt

public static AbstractModel getAbstractModelAt(int index)

Returns the AbstractModel at a specified index.

Parameters:

index - the index into the models vector.

Returns:

the AbstractModel at the specified index.

addAbstractModel

public static void addAbstractModel(AbstractModel model)

A-463
Adds a new AbstractModel to the ModelEditor.

Note: The model will be added to the Navigator on the Swing event thread.

Parameters:

model - the AbstractModel.

See Also:

addAbstractModel(AbstractModel, String)

addAbstractModel

public static void addAbstractModel(AbstractModel model,

 String label)

Adds a new AbstractModel to the model editor. Sets this model as the currently selected model, and refreshes the Navigator.

Note: The model will be added to the Navigator on the Swing event thread.

Parameters:

label - the String label for this model, if NULL the next available is assigned.

model - the AbstractModel to add

removeAbstractModel

public static void removeAbstractModel(AbstractModel model)

Removes a AbstractModel from the model editor. If this was the currently selected model, and there is another model, the first

of the other models is set selected. Otherwise, it is left null

Parameters:

model - the AbstractModel.

findModelByIdent

public static AbstractModel findModelByIdent(int ident)

This finds the AbstractModel with the given ident. A Model's ident is given to it when it is opened inside the ModelEditor. This

allows the ModelEditor to keep the open models separate.

Parameters:

ident - the ident of the model.

Returns:

the AbstractModel with the given ident, or NULL if not found.

getReferenceModel

public static AbstractModel getReferenceModel(AbstractModel model)

Retrieves the reference model for the given model if one has been loaded.

Parameters:

model - the AbstractModel to retrieve a reference model for.

Returns:

A-464
an AbstractModel reference to the given model's reference model.

loadReferenceModel

public static void loadReferenceModel(AbstractModel model,

 java.io.File file)

Loads the reference model for the given model from the given file.

Parameters:

model - the AbstractModel to load a reference model for.

file - the File to load the reference model from.

Returns:

an AbstractModel reference to the given model's reference model.

getAbstractModelCount

public static int getAbstractModelCount()

Returns the number of models currently inside the calculation project.

Returns:

the size of the models vector.

dateStamp

public static String dateStamp()

Gets a string that contains the current date.

Returns:

the String containing the current date and time.

setWaitCursor

public static void setWaitCursor()

Sets the cursor to a cursor indicating the user should wait for a process before continuing.

See Also:

java.awt.Cursor

resetCursor

public static void resetCursor()

Sets the cursor to the default cursor when the process requiring the waiting is complete.

See Also:

java.awt.Cursor

A-465
submitModel

public static void submitModel(AbstractModel model,

 boolean local)

Submits the given model for execution using its plug-in specific submitModel method.

See Also:

MECodePlugin.submitModel(AbstractModel, boolean)

disableMainFrame

public static void disableMainFrame()

Disables all mouse events for this MainFrame. Activates the glass pane within this MainFrame and consumes all mouse events

before they can be delivered to the underlying components.

enableMainFrame

public static void enableMainFrame()

Deactivates this MainFrame's glass pane thus allowing mouse events to pass through to the underlying components.

refreshSteamTable

public static void refreshSteamTable()

Refreshes the loaded steam tables.

deactivateRedoButtons

public static void deactivateRedoButtons()

disables the undoButton and redoButton

setVisible

public void setVisible(boolean visible)

Shows or hides this MainFrame.

Parameters:

visible - if true, a thread will be started to load the steam tables.

removeExcessRecents

public void removeExcessRecents()

openFileSelector

public java.io.File openFileSelector(String title,

 int selectorType)

A-466
Opens a JFileChooser of the appropriate type configured with the given title and an appropriate button name and returns either

the selected file or null on failure.

Parameters:

title - a String containing the desired dialog title.

selectorType - one of the SELECTOR_* enumerated integers. Used to determine which 'last' property to track and how

to configure the dialog.

Returns:

the File selected by the user, or null if it was cancelled.

setWindowLocation

public static void setWindowLocation(java.awt.Window window)

Sets the given window's location to be that of the center of this main frame's current screen.

Parameters:

window - the Window to set location for.

setChildLocation

public void setChildLocation(java.awt.Window childWindow)

Sets the given window's location to be that of the center of this main frame's current screen.

Parameters:

childWindow - the Window to set location for.

offsetWindowLocation

public static void offsetWindowLocation(java.awt.Window childWindow)

Offsets the given childWindow from other windows of the same type so that they do not overlap each other perfectly, hiding

one another.

Note: The given window must be registered first with addRegisteredDialog.

setFileChooserLocation

public static void setFileChooserLocation(JFileChooser dlg)

Sets the given JFileChooser's location to be the center of the main frame's current screen. This is primarily used by the Plugins

to open FileChoosers in the center of the screen.

Parameters:

dlg - the JFileChooser that has just been opened.

lostOwnership

public void lostOwnership(java.awt.datatransfer.Clipboard clipboard,

 java.awt.datatransfer.Transferable contents)

The ClipboardOwner inferface routine. Implemented as a noop here.

A-467
Parameters:

clipboard - the Clipboard.

contents - the Transferable contents on the clipboard.

getPrefs

public SnapPreferences getPrefs()

Getter for the SnapPreferences object.

Returns:

prefs.

setUserName

public void setUserName(String name)

Sets the current user id.

Parameters:

name - the String user id.

getUserName

public String getUserName()

Gets the current user id.

Returns:

the String user id.

main

public static void main(String[] args)

This is the main function for the ModelEditor. It spawns a new instance of the MainFrame, opens all the Corba objects, and

handles all of the commandline arguments.

Parameters:

args - the String[] command line arguments. Acceptable arguments are:

• --version : prints out the current version of the ModelEditor.

• --usage & --help : prints out the command line help.

• --debug : Turns on debugging.

• --nosplash : Turns off the splash screen.

• --userid : Sets the current userid to the next argument.

• --batch : Opens the batchfile contained in the next argument.

getOrb

public org.omg.CORBA.ORB getOrb()

Gets the current CORBA orb. If that ORB does not exist, it creates it. This is needed for submitting jobs.

A-468
Returns:

the org.omg.CORBA.ORB object.

See Also:

org.omg.CORBA.ORB

isJava3DAvailable

public static boolean isJava3DAvailable()

Returns true if the Java3D libraries are available in the current classloader's classpath.

addExportItem

public static void addExportItem(JMenuItem item)

This inserts a new export option into the export menu. This allows MEPlugins to add plugin specific export actions to the

MainFrame's menu.

Parameters:

item - the JMenuItem being added.

addImportItem

public static void addImportItem(JMenuItem item)

This inserts a new import option into the import menu. This allows MEPlugins to add plugin specific import actions to the

MainFrame's menu.

Parameters:

item - the JMenuItem being added.

addMenuItem

public static void addMenuItem(JMenuItem item,

 String name)

This is used to add a new menu item to the model editor main frame menu bar.

Parameters:

item - This JMenuItem is about to be inserted into a menu.

name - the Name of the menu where the item is to be inserted. Allowed Names are:

• FILE

• EDIT

• VIEW

• TOOLS

• WINDOW

• HELP

A-469
findClientPlugin

public static ClientCodePlugin findClientPlugin(String id)

Finds a client plugin by its ID.

Parameters:

id - the String id of the plugin being looked for.

Returns:

the ClientCodePlugin with the given id; or null of not found

getClientPluginAt

public static ClientCodePlugin getClientPluginAt(int index)

Returns the plugin at the specified index into the client plugins vector.

Parameters:

index - the index of the desired client plugin

Returns:

the ClientCodePlugin at the specified index.

getClientPluginCount

public static int getClientPluginCount()

Returns the number of client plugins currently loaded.

Returns:

the number of client plugins available

findPlugin

public static MEPlugin findPlugin(String id)

Finds a plugin by its ID. If the plugin is a MECodePlugin, the plugin ID should be the same as the code name of an

AbstractModel built by that plugin.

Parameters:

id - the String id of the plugin being looked for.

Returns:

the MEPlugin with id for its PluginId, or null of there isn't one.

getPluginAt

public static MEPlugin getPluginAt(int index)

Returns the plugin at the specified index into the plugins vector.

Parameters:

index - the index into the plugin vector.

A-470
Returns:

the MEPlugin at the specified index.

getPluginCount

public static int getPluginCount()

Retursn the number of plugins currently loaded.

Returns:

the size of the plugins vector.

getCodePlugins

public static MECodePlugin[] getCodePlugins()

This returns all of the plugins currently loaded that extend MECodePlugin.

Returns:

A MECodePlugin[] containing all the currently loaded code plugins.

getValidLabel

public static String getValidLabel(String label)

Returns a valid key string for the user defined key passed in. If NULL is passed in, this will return the next available key. If the

key is invalid, this will return NULL.

Parameters:

label - See Above

Returns:

See Above

isValidLabel

public static boolean isValidLabel(String label)

Determines if the given label is text that can be processed as a valid model label. This is for determining if a KEY is being used

or BATCH format.

Parameters:

label - the string being tested.

Returns:

TRUE if the string consists of the character 'M' followed by an integer.

getFeaturePlugins

public static MEFeaturePlugin[] getFeaturePlugins(AbstractModel model)

Finds all of the feature plugins that have data that needs to be stored along with the given model. This makes use of the

MEFeaturePlugin.isAssociated(AbstractModel) function on all of the current MEFeaturePlugins.

Parameters:

A-471
model - the AbstractModel that is about to be stored.

Returns:

the MEFeaturePlugin[] of plugins associated with the model.

getFeaturePlugins

public static MEFeaturePlugin[] getFeaturePlugins()

Returns an array of all the MEFeaturePlugins that are currently loaded.

Returns:

the current MEFeaturePlugins.

getSnapHomeDirectory

public static java.io.File getSnapHomeDirectory()

Returns the installation directory for CAFEAN. This is either passed to the VM by a -DCAFEAN_HOME="dir" or its the

current working directory.

Returns:

the File object containing the absolute path to the current working component.

getFileChooser

public static FileChooser getFileChooser()

Gives access to a FileChooser for selecting a file. This should be used by any plugin that attempts to load or store information

in a file. The dialog created by this FileChooser always appears at the center of the screen.

Returns:

the FileChooser created by the ModelEditor.

addRegisteredDialog

public static void addRegisteredDialog(java.awt.Dialog dialog,

 AbstractModel model)

Adds the given dialog to the MainFrame's list of registered child dialogs. Registered child dialogs appear in the Windows menu

and have their location offset from other registered windows by setWindowLocation(Window).

Parameters:

dialog - the Dialog that will be added to the window list.

model - the AbstractModel that the given dialog is related to

getRegisteredDialogs

public static Iterator getRegisteredDialogs()

Returns an unmodifiable List of the registered dialogs.

A-472
getRegisteredDialogs

public static Iterator getRegisteredDialogs(AbstractModel model)

Returns an unmodifiable List of the registered dialogs for a given model

removeRegisteredDialog

public static void removeRegisteredDialog(java.awt.Dialog dialog,

 AbstractModel model)

Removes the given dialog from the MainFrame's list of registered child dialogs.

Parameters:

dialog - the Dialog that will be removed from the window list.

See Also:

addRegisteredDialog(Dialog, AbstractModel)

addRegisteredFrame

public static void addRegisteredFrame(java.awt.Frame frame,

 AbstractModel model)

Adds the given frame to the MainFrame's list of registered frames. Registered frames appear in the Windows menu and have

their location offset from other registered windows by setWindowLocation(Window).

Parameters:

dialog - the Frame that will be added to the frame list.

model - the AbstractModel that the given Frame is related to

getRegisteredFrames

public static Iterator getRegisteredFrames()

Returns an unmodifiable List of the registered Frames.

getRegisteredFrames

public static Iterator getRegisteredFrames(AbstractModel model)

Returns an unmodifiable List of the registered Frames for a given model

removeRegisteredFrame

public static void removeRegisteredFrame(java.awt.Frame frame,

 AbstractModel model)

Removes the given Frame from the MainFrame's list of registered frames.

Parameters:

frame - the Frame that will be removed from the frame list.

See Also:

addRegisteredFrame(Frame, AbstractModel)

A-473
addClassificationListener

public static void addClassificationListener(ClassificationListener listener)

adds the given ClassificationListener to the list of listeners notified when the current Classification level changes.

Note: the new listener is notified immediately upon addition.

removeClassificationListener

public static void removeClassificationListener(ClassificationListener listener)

removes the given ClassificationListener from the list of listeners notified when the current Classification level changes.

updateClassification

public static void updateClassification()

Updates the current classification level based on the currently open models.

getMode

public static int getMode()

Getter for property mode.

Returns:

Value of property mode.

setMode

public static void setMode(int mode_)

Setter for property mode.

Parameters:

mode - New value of property mode.

getPdfViewer

public PDFViewer getPdfViewer()

Getter for property pdfViewer.

Returns:

Value of property pdfViewer.

updatePlaybackButtons

public void updatePlaybackButtons()

Enables or disables the pause, play and time buttons based on the current state of the Source Manger and it's master run.

A-474
setPlaybackTime

public static void setPlaybackTime(String mess)

Sets the currently display status message

Parameters:

mess - A String containing the new message

addContextHelp

public static void addContextHelp(java.awt.Component comp,

 String label)

Adds a component to the context sensitive help, with the given label.

addPlaybackPanel

public void addPlaybackPanel(com.cafean.client.anim.PlaybackButtonPanel panel)

Adds the given playback panel to the list of controls updated in updatePlaybackButtons()

removePlaybackPanel

public void removePlaybackPanel(com.cafean.client.anim.PlaybackButtonPanel panel)

Removes the given playback panel from the list of controls updated in updatePlaybackButtons()

addPlaybackControl

public void addPlaybackControl(com.cafean.client.anim.PlaybackControl control)

Adds the given playback control to the list of controls updated in updatePlaybackButtons()

removePlaybackControl

public void removePlaybackControl(com.cafean.client.anim.PlaybackControl control)

Removes the given playback control from the list of controls updated in updatePlaybackButtons()

resetMenus

public void resetMenus()

Resets the menus on the main toolbar of the MainFrame. This rebuilds all of the menus, and allows plugins to be disabled or

enabled while the MainFrame is open.

isPluginEnabled

public static boolean isPluginEnabled(MECodePlugin plugin)

Returns the enabled state of the given MECodePlugin.

A-475
setPluginEnabled

public static void setPluginEnabled(MECodePlugin plugin,

 boolean enabled)

Sets whether a given property is enabled or not.

isPluginInUse

public static boolean isPluginInUse(MECodePlugin plugin)

Determines if the given MECodePlugin is currently in use by the ModelEditor. A MECodePlugin is considered in use if and

only if there exists an open model for that plugin.

initializeDataSources

public void initializeDataSources()

Loads Custom data sources from client code plug-ins that implement the IncludesDataSource interface.

appendExportItems

public static void appendExportItems(JMenu export)

appendToolsItems

public static void appendToolsItems(JMenu tools)

addModelNavigationShortcut

public static void addModelNavigationShortcut(JComponent comp)

Adds a shortcut to the input/action maps of the given component used to display the ModelSelectionPopup. The initiating keypress is CTRL+TAB. While CTRL is held, the user can repeatedly press or hold TAB to cycle through models. Upon releasing

CTRL, the highlighted model in the popup is selected in the Navigator.

Any tables, lists, and other components displayed in the MainFrame that manually add a CTRL+TAB action and are displayed

somewhere within the MainFrame should be passed to this method.

Parameters:

comp - the component

A-476
com.cafean.client.ui

Class MessageWindow

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JPanel

 |

 +-com.cafean.client.ui.MessageWindow

public class MessageWindow

extends JPanel

A panel implementation of a centralized message window.

All Implemented Interfaces:

java.io.Serializable, java.awt.MenuContainer, java.awt.image.ImageObserver, HasGetTransferHandler,

java.io.Serializable, javax.accessibility.Accessible

Field Summary

public static final AlertMsg

Message type for non-error messages that the user should be alerted to.

Value: 0

public static final AlertSound

unused sound type

Value: 0

public static final ConnectSound

unused sound type

Value: 5

public static final DisconnectSound

unused sound type

Value: 6

public static final InfoMsg

Message type for normal messages.

Value: 1

public static final InfoSound

unused sound type

Value: 1

A-477
public static final InternalErrMsg

Message type for errors that are not user created or caused.

Value: 4

public static final InternalErrSound

unused sound type

Value: 4

public static final NoSound

unused sound type

Value: -1

public static final UserErrorMsg

Message type for errors that are considered user created or caused

Value: 3

public static final UserErrorSound

unused sound type

Value: 3

public static final WarningMsg

Message type for non-fatal errors or warnings

Value: 2

public static final WarningSound

unused sound type

Value: 2

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Constructor Summary

public MessageWindow()

Creates new form MessageDialog.

Method Summary

int addMessage(Message message)

A-478
int addMessage(String message)

Adds the given message as type InfoMsg.

void addMessage(String text, AbstractComponent comp)

Adds the given message as type InfoMsg with the attached component.

void addMessage(String text, AbstractComponent comp, int severityCode)

Adds the given message as type severityCode with the attached component.

void addMessage(String text, GenericObject object, int severityCode)

Adds the given message as type severityCode with the attached component.

int addMessage(String text, int severityCode)

Adds the given message with the given severity code

void addMessage(String text, int severityCode, Object[] object)

void addMessage(String text, Vector comps, int severityCode)

Adds the given message as type severityCode with the attached components.

void addMessage(String text, ViewComponent comp, int severityCode, JComponent

uiComp)

Adds the given message as type severityCode in the given View for the given UI

Component.

static void addMessageListener(MessageSelectionListener msl)

Prepends the message listener to the head of the listeners array.

void addNotify()

void addSound(int soundType)

Sound is not supported by MessageWindow.

void clearCheckErrors()

Sets the error count beginning index to the number of messages currently in the table so that

they will not be counted as errors or warnings in subsequent getErrorCount or

getWarningCount calls.

void clearWarningCount()

Sets the error count beginning index to the number of messages currently in the table so that

they will not be counted as errors or warnings in subsequent getErrorCount or

getWarningCount calls.

String dateStamp()

Creates a formatted date stamp of the current time/date.

static void fireMessageSelected(Message[] messages)

Fires a new MessageSelectionEvent on all the listeners.

static MessageWindow getInstance()

retrieves the singleton instance of the message window

Message[] getMessages()

A-479
int getNumberOfErrorsFound()

Retrieves the number of error messages since the last clearWarningCount or clearCheckErrors

call.

java.io.PrintStream getOutputStream()

Retrieves the PrintStream that this MessageWindow sends it's alternate output stream to.

int getWarningCount()

Retrieves the number of warning messages since the last clearWarningCount or

clearCheckErrors call.

void removeModelRefs(AbstractModel model)

Removes the objects inside the current message list that use the given model as a reference.

void setGroupMessages(boolean group)

Sets the flag that groups the incomming messages together.

void setOutputStream(java.io.PrintStream out)

Sets the PrintStream that this MessageWindow sends it's alternate output stream to.

void setupContextHelp()

Sets up the context sensitive help on the Message Window

void toFront()

ensures that this message window is visible

Methods inherited from class javax.swing.JPanel

getAccessibleContext, getUI, getUIClassID, setUI, updateUI

Methods inherited from class javax.swing.JComponent

A-480
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-481
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-482
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Fields

AlertMsg

public static final int AlertMsg

Message type for non-error messages that the user should be alerted to.

Constant value: 0

InfoMsg

public static final int InfoMsg

Message type for normal messages.

Constant value: 1

WarningMsg

public static final int WarningMsg

Message type for non-fatal errors or warnings

Constant value: 2

UserErrorMsg

public static final int UserErrorMsg

Message type for errors that are considered user created or caused

Constant value: 3

InternalErrMsg

public static final int InternalErrMsg

Message type for errors that are not user created or caused.

Constant value: 4

NoSound

public static final int NoSound

unused sound type

Constant value: -1

A-483
AlertSound

public static final int AlertSound

unused sound type

Constant value: 0

InfoSound

public static final int InfoSound

unused sound type

Constant value: 1

WarningSound

public static final int WarningSound

unused sound type

Constant value: 2

UserErrorSound

public static final int UserErrorSound

unused sound type

Constant value: 3

InternalErrSound

public static final int InternalErrSound

unused sound type

Constant value: 4

ConnectSound

public static final int ConnectSound

unused sound type

Constant value: 5

DisconnectSound

public static final int DisconnectSound

unused sound type

Constant value: 6

Constructors

MessageWindow

public MessageWindow()

A-484
Creates new form MessageDialog. This should only be done by the MainFrame, when a new instance of the ModelEditor is

started. The MessageWindow is never Modal, and always uses the current instance of the MainFrame as a parent.

Methods

getInstance

public static MessageWindow getInstance()

retrieves the singleton instance of the message window

addNotify

public void addNotify()

setupContextHelp

public void setupContextHelp()

Sets up the context sensitive help on the Message Window

setOutputStream

public void setOutputStream(java.io.PrintStream out)

Sets the PrintStream that this MessageWindow sends it's alternate output stream to. The alternate output stream can be turned

off by using setOutputStream(null) and defaults to System.err.

Parameters:

out - the PrintStream to print alternate output to.

getOutputStream

public java.io.PrintStream getOutputStream()

Retrieves the PrintStream that this MessageWindow sends it's alternate output stream to. The alternate output stream can be

turned off by using setOutputStream(null) and defaults to System.err.

clearWarningCount

public void clearWarningCount()

Sets the error count beginning index to the number of messages currently in the table so that they will not be counted as errors

or warnings in subsequent getErrorCount or getWarningCount calls.

clearCheckErrors

public void clearCheckErrors()

Sets the error count beginning index to the number of messages currently in the table so that they will not be counted as errors

or warnings in subsequent getErrorCount or getWarningCount calls.

A-485
addMessage

public int addMessage(String message)

Adds the given message as type InfoMsg. If the message begins with the string Error or Warning then it is added without that

prefix.

Parameters:

message - a String containing the message to be displayed.

addMessage

public int addMessage(String text,

 int severityCode)

Adds the given message with the given severity code

Parameters:

text - a String containing the message to be displayed.

Returns:

the index of the Message created for use with replaceMessage.

addMessage

public void addMessage(String text,

 AbstractComponent comp)

Adds the given message as type InfoMsg with the attached component.

Parameters:

text - a String containing the message to be displayed.

Returns:

the index of the Message created for use with replaceMessage.

addMessage

public void addMessage(String text,

 Vector comps,

 int severityCode)

Adds the given message as type severityCode with the attached components.

Parameters:

text - a String containing the message to be displayed.

Returns:

the index of the Message created for use with replaceMessage.

addMessage

public void addMessage(String text,

 AbstractComponent comp,

 int severityCode)

A-486
Adds the given message as type severityCode with the attached component.

Parameters:

text - a String containing the message to be displayed.

Returns:

the index of the Message created for use with replaceMessage.

addMessage

public void addMessage(String text,

 int severityCode,

 Object[] object)

addMessage

public void addMessage(String text,

 ViewComponent comp,

 int severityCode,

 JComponent uiComp)

Adds the given message as type severityCode in the given View for the given UI Component.

Parameters:

text - a String containing the message to be displayed.

uiComp - the JComponent target of this message.

Returns:

the index of the Message created for use with replaceMessage.

addMessage

public void addMessage(String text,

 GenericObject object,

 int severityCode)

Adds the given message as type severityCode with the attached component.

Parameters:

text - a String containing the message to be displayed.

Returns:

the index of the Message created for use with replaceMessage.

addMessage

public int addMessage(Message message)

A-487
setGroupMessages

public void setGroupMessages(boolean group)

Sets the flag that groups the incomming messages together. These messages are not displayed inside the table, but collected

inside an ArrayList. The list of grouped messages can be accessed until the group flag is set to true again.

Parameters:

group - the boolean flag that groups messages together.

getMessages

public Message[] getMessages()

getWarningCount

public int getWarningCount()

Retrieves the number of warning messages since the last clearWarningCount or clearCheckErrors call.

getNumberOfErrorsFound

public int getNumberOfErrorsFound()

Retrieves the number of error messages since the last clearWarningCount or clearCheckErrors call.

toFront

public void toFront()

ensures that this message window is visible

addSound

public void addSound(int soundType)

Sound is not supported by MessageWindow.

dateStamp

public String dateStamp()

Creates a formatted date stamp of the current time/date.

addMessageListener

public static void addMessageListener(MessageSelectionListener msl)

Prepends the message listener to the head of the listeners array. This allows for listeners to override the message selection

behavior in a specific plug-in.

A-488
fireMessageSelected

public static void fireMessageSelected(Message[] messages)

Fires a new MessageSelectionEvent on all the listeners. The first listener to consume the event terminates the loop.

removeModelRefs

public void removeModelRefs(AbstractModel model)

Removes the objects inside the current message list that use the given model as a reference.

Parameters:

model

A-489
com.cafean.client.ui

Class NamedValueSelector

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-java.awt.Window

 |

 +-java.awt.Dialog

 |

 +-javax.swing.JDialog

 |

 +-com.cafean.client.ui.NamedValueSelector

public class NamedValueSelector

extends JDialog

The NamedValueSelector provides the user with list of values with a name associated with them. The NamedValueSelector is given

two parallel arrays or Vectors with the value and the names in each.

All Implemented Interfaces:

java.io.Serializable, java.awt.MenuContainer, java.awt.image.ImageObserver, javax.accessibility.Accessible,

HasGetTransferHandler, RootPaneContainer, javax.accessibility.Accessible, WindowConstants

Fields inherited from class java.awt.Dialog

DEFAULT_MODALITY_TYPE

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

Fields inherited from interface javax.swing.WindowConstants

DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE

Constructor Summary

public NamedValueSelector(java.awt.Frame parent, Object[] values, Object[]

names)

Creates a new NamedValueSelector that is modal over the given parent.

public NamedValueSelector(JDialog parent, Object[] values, Object[] names)

Creates a new NamedValueSelector that is modal over the given parent.

public NamedValueSelector(java.awt.Frame parent, Vector values, Vector names)

Creates a new NamedValueSelector that is modal over the given parent.

A-490
public NamedValueSelector(JDialog parent, Vector values, Vector names)

Creates a new NamedValueSelector that is modal over the given parent.

Method Summary

int getSelectedIndex()

Returns the index of the object selected by the user.

TableCellEditor getTableCellEditor()

Provides a table cell editor of a property editor panel and the popup named value selection

dialog

boolean isCancelled()

This is used to determine how the user closed the NamedValueSelector.

void setFirstFieldDisplayed(boolean value)

Method will enable or disable the first field in the "value -- name" displayed in this editor.

void setSelectedIndex(int val)

Sets the selected index for this value selector.

void setSelectedValue(Object val_)

Sets the selected value for this value selector.

void setValueLabel(String text)

Methods inherited from class javax.swing.JDialog

getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane,

getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler,

isDefaultLookAndFeelDecorated, remove, repaint, setContentPane,

setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar,

setLayeredPane, setLayout, setTransferHandler, update

Methods inherited from class java.awt.Dialog

addNotify, getAccessibleContext, getModalityType, getTitle, hide, isModal, isResizable,

isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated,

setVisible, show, toBack

Methods inherited from class java.awt.Window

A-491
addNotify, addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener,

addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle,

createBufferStrategy, createBufferStrategy, dispose, getAccessibleContext,

getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner,

getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext,

getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner,

getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString,

getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide,

isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot,

isFocused, isLocationByPlatform, isShowing, pack, postEvent, removeNotify,

removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape,

setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState,

setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform,

setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize,

setVisible, show, toBack, toFront

Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-492
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.accessibility.Accessible

A-493
getAccessibleContext

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface javax.swing.RootPaneContainer

getContentPane, getGlassPane, getLayeredPane, getRootPane, setContentPane, setGlassPane,

setLayeredPane

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

getTransferHandler

Constructors

NamedValueSelector

public NamedValueSelector(java.awt.Frame parent,

 Object[] values,

 Object[] names)

Creates a new NamedValueSelector that is modal over the given parent.

Parameters:

parent - the Frame object that spawned this selector.

values - the Object[] of values.

names - the Object[] of names for the values.

NamedValueSelector

public NamedValueSelector(JDialog parent,

 Object[] values,

 Object[] names)

Creates a new NamedValueSelector that is modal over the given parent.

Parameters:

parent - the JDialog object that spawned this selector.

values - the Object[] of values.

names - the Object[] of names for the values.

NamedValueSelector

public NamedValueSelector(java.awt.Frame parent,

 Vector values,

 Vector names)

Creates a new NamedValueSelector that is modal over the given parent.

Parameters:

A-494
parent - the Frame object that spawned this selector.

values - the Vector of values.

names - the Vector of names for the values.

NamedValueSelector

public NamedValueSelector(JDialog parent,

 Vector values,

 Vector names)

Creates a new NamedValueSelector that is modal over the given parent.

Parameters:

parent - the Dialog object that spawned this selector.

values - the Vector of values.

names - the Vector of names for the values.

Methods

setSelectedIndex

public void setSelectedIndex(int val)

Sets the selected index for this value selector.

setSelectedValue

public void setSelectedValue(Object val_)

Sets the selected value for this value selector.

getSelectedIndex

public int getSelectedIndex()

Returns the index of the object selected by the user.

Returns:

the index of the Object selected by the user.

isCancelled

public boolean isCancelled()

This is used to determine how the user closed the NamedValueSelector. If the user exits the dialog by any means other then by

pressing the OK button, this is set to TRUE.

Returns:

FALSE if the user pressed the OK button.

setValueLabel

public void setValueLabel(String text)

A-495
setFirstFieldDisplayed

public void setFirstFieldDisplayed(boolean value)

Method will enable or disable the first field in the "value -- name" displayed in this editor. ( i.e. 1 -- CVH will be seen as CVH

if this method is passed false)

Parameters:

value - the boolean which determines if the first field value should be displayed.

getTableCellEditor

public TableCellEditor getTableCellEditor()

Provides a table cell editor of a property editor panel and the popup named value selection dialog

Returns:

the TableCellEditor to be used for this dialog

A-496
com.cafean.client.ui

Class Pad

java.lang.Object

 |

 +-com.cafean.client.ui.Pad

public class Pad

extends Object

implements Cloneable

A small storage class for the location and direction of a connecting point in a drawn component.

All Implemented Interfaces:

Cloneable

Constructor Summary

public Pad(int direction, java.awt.geom.Point2D.Double pt)

Creates a new Pad with the given direction and location.

public Pad(int direction, double xd, double yd)

Creates a new Pad with the given direction and location.

Method Summary

int getFace()

Sets this pad's face.

java.awt.Point getLocation()

Retrieves this Pad's location

java.awt.geom.Point2D

.Double

getPadXY()

Retrieves this Pad's location

void setFace(int face)

Sets this pad's face.

void setPadXY(double xd, double yd)

Sets this pad's location

void setPadXY(int x, int y)

Sets this pad's location

void setPadXY(java.awt.Point pt)

Sets this pad's location

void setPadXY(java.awt.geom.Point2D.Double pt)

Sets this pad's location

A-497
void setPadXY(java.awt.geom.Point2D pt)

Sets this pad's location

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

Pad

public Pad(int direction,

 java.awt.geom.Point2D.Double pt)

Creates a new Pad with the given direction and location.

Pad

public Pad(int direction,

 double xd,

 double yd)

Creates a new Pad with the given direction and location.

Methods

setPadXY

public void setPadXY(int x,

 int y)

Sets this pad's location

setPadXY

public void setPadXY(double xd,

 double yd)

Sets this pad's location

setPadXY

public void setPadXY(java.awt.geom.Point2D.Double pt)

Sets this pad's location

setPadXY

public void setPadXY(java.awt.geom.Point2D pt)

Sets this pad's location

A-498
setPadXY

public void setPadXY(java.awt.Point pt)

Sets this pad's location

getPadXY

public java.awt.geom.Point2D.Double getPadXY()

Retrieves this Pad's location

getLocation

public java.awt.Point getLocation()

Retrieves this Pad's location

setFace

public void setFace(int face)

Sets this pad's face. This value is also referred to as direction.

getFace

public int getFace()

Sets this pad's face. This value is also referred to as direction.

A-499
com.cafean.client.ui

Class RealArrayDialog

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-java.awt.Window

 |

 +-java.awt.Dialog

 |

 +-javax.swing.JDialog

 |

 +-com.cafean.client.ui.RealArrayDialog

public class RealArrayDialog

extends JDialog

This dialog allows the user to change the values stored inside an array of Reals. Optionally this allows for the number of elements

inside the array to change as well. This option defaults to true.

All Implemented Interfaces:

java.io.Serializable, java.awt.MenuContainer, java.awt.image.ImageObserver, javax.accessibility.Accessible,

HasGetTransferHandler, RootPaneContainer, javax.accessibility.Accessible, WindowConstants

Nested Class Summary

class RealArrayDialog.TempClipboardEnabledTable

RealArrayDialog.TempClipboardEnabledTable

Fields inherited from class java.awt.Dialog

DEFAULT_MODALITY_TYPE

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

Fields inherited from interface javax.swing.WindowConstants

DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE

Constructor Summary

public RealArrayDialog(java.awt.Frame parent, Real[] array)

Creates new form RealArrayDialog

A-500
public RealArrayDialog(java.awt.Frame parent, Real[] array, boolean

fixedDimension)

Creates a new RealArrayDialog for editing the given array, setting whether the array's length

can be modified.

public RealArrayDialog(java.awt.Frame parent, Real[] array, boolean

fixedDimension, AbstractModel model)

Creates a new RealArrayDialog for editing the given array, setting whether the array's length

can be modified.

public RealArrayDialog(JDialog parent, Real[] array)

Creates new form RealArrayDialog

public RealArrayDialog(JDialog parent, Real[] array, boolean fixedDimension)

Creates a new RealArrayDialog for editing the given array, setting whether the array's length

can be modified.

public RealArrayDialog(JDialog parent, Real[] array, boolean fixedDimension,

AbstractModel model)

Creates a new RealArrayDialog for editing the given array, setting whether the array's length

can be modified.

Method Summary

Real[] getArray()

Gets the array that has been modified by this dialog.

boolean isCancelled()

Determins how the dialog was exited.

void setCustomTable(JTable table)

Sets the editor's table to a custom plug-in specified table.

void setSortable(boolean val_)

Enables sorting of the real array.

Methods inherited from class javax.swing.JDialog

getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane,

getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler,

isDefaultLookAndFeelDecorated, remove, repaint, setContentPane,

setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar,

setLayeredPane, setLayout, setTransferHandler, update

Methods inherited from class java.awt.Dialog

addNotify, getAccessibleContext, getModalityType, getTitle, hide, isModal, isResizable,

isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated,

setVisible, show, toBack

Methods inherited from class java.awt.Window

A-501
addNotify, addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener,

addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle,

createBufferStrategy, createBufferStrategy, dispose, getAccessibleContext,

getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner,

getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext,

getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner,

getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString,

getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide,

isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot,

isFocused, isLocationByPlatform, isShowing, pack, postEvent, removeNotify,

removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape,

setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState,

setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform,

setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize,

setVisible, show, toBack, toFront

Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-502
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.accessibility.Accessible

A-503
getAccessibleContext

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface javax.swing.RootPaneContainer

getContentPane, getGlassPane, getLayeredPane, getRootPane, setContentPane, setGlassPane,

setLayeredPane

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

getTransferHandler

Constructors

RealArrayDialog

public RealArrayDialog(java.awt.Frame parent,

 Real[] array)

Creates new form RealArrayDialog

RealArrayDialog

public RealArrayDialog(java.awt.Frame parent,

 Real[] array,

 boolean fixedDimension)

Creates a new RealArrayDialog for editing the given array, setting whether the array's length can be modified.

Parameters:

parent - the Frame that created this editor.

array - the Real[] that is being modified.

fixedDimension - whether the user can modify the number of elements.

RealArrayDialog

public RealArrayDialog(java.awt.Frame parent,

 Real[] array,

 boolean fixedDimension,

 AbstractModel model)

Creates a new RealArrayDialog for editing the given array, setting whether the array's length can be modified.

Parameters:

parent - the Frame that created this editor.

array - the Real[] that is being modified.

fixedDimension - whether the user can modify the number of elements.

A-504
RealArrayDialog

public RealArrayDialog(JDialog parent,

 Real[] array)

Creates new form RealArrayDialog

RealArrayDialog

public RealArrayDialog(JDialog parent,

 Real[] array,

 boolean fixedDimension)

Creates a new RealArrayDialog for editing the given array, setting whether the array's length can be modified.

Parameters:

parent - the JDialog that created this editor.

array - the Real[] that is being modified.

fixedDimension - whether the user can modify the number of elements.

RealArrayDialog

public RealArrayDialog(JDialog parent,

 Real[] array,

 boolean fixedDimension,

 AbstractModel model)

Creates a new RealArrayDialog for editing the given array, setting whether the array's length can be modified.

Parameters:

parent - the JDialog that created this editor.

array - the Real[] that is being modified.

fixedDimension - whether the user can modify the number of elements.

Methods

setSortable

public void setSortable(boolean val_)

Enables sorting of the real array. This ensures that the values in this table always appear in increasing numerical order.

setCustomTable

public void setCustomTable(JTable table)

Sets the editor's table to a custom plug-in specified table.

Parameters:

table - the JTable plug-in customized table used to edit.

isCancelled

public boolean isCancelled()

A-505
Determins how the dialog was exited.

Returns:

true unless the Ok button was pressed.//GEN-HEADEREND:event_closeDialog

getArray

public Real[] getArray()

Gets the array that has been modified by this dialog.

A-506
com.cafean.client.ui

Class RealArrayDialog.TempClipboardEnabledTable

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JTable

 |

 +-com.cafean.utils.ClipboardEnabledTable

 |

 +-com.cafean.client.ui.RealArrayDialog.TempClipboardEnabledTable

public class RealArrayDialog.TempClipboardEnabledTable

extends ClipboardEnabledTable

A JTable extension designed to allow proper system clipboard copy/paste behavior for derived tables.

All Implemented Interfaces:

java.io.Serializable, java.awt.MenuContainer, java.awt.image.ImageObserver, HasGetTransferHandler,

java.io.Serializable, RowSorterListener, javax.accessibility.Accessible, CellEditorListener, ListSelectionListener,

TableColumnModelListener, Scrollable, TableModelListener

Fields inherited from class javax.swing.JTable

AUTO_RESIZE_ALL_COLUMNS, AUTO_RESIZE_LAST_COLUMN, AUTO_RESIZE_NEXT_COLUMN, AUTO_RESIZE_OFF,

AUTO_RESIZE_SUBSEQUENT_COLUMNS

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Constructor Summary

public RealArrayDialog.TempClipboardEnabledTable()

This constructor should be used by components which do not desire to have undo events

generated on paste or have rows created on paste.

A-507
public RealArrayDialog.TempClipboardEnabledTable(TableModel model,

AbstractComponent workingComponent)

This constructor should be used by components which do desire to have undo events generated

on paste.

Method Summary

void addNotify()

void cancelTableEditing()

boolean editCellAt(int row, int column)

Programmatically starts editing the cell at row and column, if those indices are in the valid

range, and the cell at those indices is editable.

TableCellEditor getCellEditor(int row, int column)

Action getCopyAction()

Retrieves an action suitable for use in a copy menu item or button

TableCellEditor getDefaultEditor(Class clss)

Action getPasteAction()

Retrieves an action suitable for use in a Paste menu item or button

Action getSelectAllAction()

Action for selecting all items in a table

Action getSortAction()

Action to sort the table data

boolean getUseMultiUndoEvents()

boolean isCurrentlyCopying()

Method determines if this table is currently copying values.

boolean isCurrentlyPasting()

Method determines if this table is currently copying values.

void removeNotify()

void stopTableEditing()

Methods inherited from class com.cafean.utils.ClipboardEnabledTable

getCopyAction, getPasteAction, isCurrentlyCopying, isCurrentlyPasting, setValueAt

Methods inherited from class javax.swing.JTable

A-508
addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval,

changeSelection, clearSelection, columnAdded, columnAtPoint, columnMarginChanged,

columnMoved, columnRemoved, columnSelectionChanged, convertColumnIndexToModel,

convertColumnIndexToView, convertRowIndexToModel, convertRowIndexToView,

createDefaultColumnsFromModel, createScrollPaneForTable, doLayout, editCellAt,

editCellAt, editingCanceled, editingStopped, getAccessibleContext,

getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getAutoResizeMode, getCellEditor,

getCellEditor, getCellRect, getCellRenderer, getCellSelectionEnabled, getColumn,

getColumnClass, getColumnCount, getColumnModel, getColumnName,

getColumnSelectionAllowed, getDefaultEditor, getDefaultRenderer, getDragEnabled,

getDropLocation, getDropMode, getEditingColumn, getEditingRow, getEditorComponent,

getFillsViewportHeight, getGridColor, getIntercellSpacing, getModel,

getPreferredScrollableViewportSize, getPrintable, getRowCount, getRowHeight,

getRowHeight, getRowMargin, getRowSelectionAllowed, getRowSorter,

getScrollableBlockIncrement, getScrollableTracksViewportHeight,

getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn,

getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount,

getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel,

getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke,

getTableHeader, getToolTipText, getUI, getUIClassID, getUpdateSelectionOnSort,

getValueAt, isCellEditable, isCellSelected, isColumnSelected, isEditing, isRowSelected,

moveColumn, prepareEditor, prepareRenderer, print, print, print, print, print,

removeColumn, removeColumnSelectionInterval, removeEditor, removeNotify,

removeRowSelectionInterval, rowAtPoint, selectAll, setAutoCreateColumnsFromModel,

setAutoCreateRowSorter, setAutoResizeMode, setCellEditor, setCellSelectionEnabled,

setColumnModel, setColumnSelectionAllowed, setColumnSelectionInterval, setDefaultEditor,

setDefaultRenderer, setDragEnabled, setDropMode, setEditingColumn, setEditingRow,

setFillsViewportHeight, setGridColor, setIntercellSpacing, setModel,

setPreferredScrollableViewportSize, setRowHeight, setRowHeight, setRowMargin,

setRowSelectionAllowed, setRowSelectionInterval, setRowSorter, setSelectionBackground,

setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid,

setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke,

setTableHeader, setUI, setUpdateSelectionOnSort, setValueAt, sizeColumnsToFit,

sizeColumnsToFit, sorterChanged, tableChanged, updateUI, valueChanged

Methods inherited from class javax.swing.JComponent

A-509
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-510
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-511
getTransferHandler

Methods inherited from interface javax.swing.event.TableModelListener

tableChanged

Methods inherited from interface javax.swing.Scrollable

getPreferredScrollableViewportSize, getScrollableBlockIncrement,

getScrollableTracksViewportHeight, getScrollableTracksViewportWidth,

getScrollableUnitIncrement

Methods inherited from interface javax.swing.event.TableColumnModelListener

columnAdded, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged

Methods inherited from interface javax.swing.event.ListSelectionListener

valueChanged

Methods inherited from interface javax.swing.event.CellEditorListener

editingCanceled, editingStopped

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface javax.swing.event.RowSorterListener

sorterChanged

Constructors

RealArrayDialog.TempClipboardEnabledTable

public RealArrayDialog.TempClipboardEnabledTable()

This constructor should be used by components which do not desire to have undo events generated on paste or have rows

created on paste.

RealArrayDialog.TempClipboardEnabledTable

public RealArrayDialog.TempClipboardEnabledTable(TableModel model,

 AbstractComponent workingComponent)

This constructor should be used by components which do desire to have undo events generated on paste.

Parameters:

model - the TableModel

workingComponent - the AbstractComponent which is being edited.

A-512
Methods

editCellAt

public boolean editCellAt(int row,

 int column)

Programmatically starts editing the cell at row and column, if those indices are in the valid range, and the cell at those indices

is editable. Note that this is a convenience method for editCellAt(int, int, null).

Parameters:

row - the row to be edited

column - the column to be edited

Returns:

false if for any reason the cell cannot be edited, or if the indices are invalid

getUseMultiUndoEvents

public boolean getUseMultiUndoEvents()

getCopyAction

public Action getCopyAction()

Retrieves an action suitable for use in a copy menu item or button

getPasteAction

public Action getPasteAction()

Retrieves an action suitable for use in a Paste menu item or button

getSelectAllAction

public Action getSelectAllAction()

Action for selecting all items in a table

getSortAction

public Action getSortAction()

Action to sort the table data

isCurrentlyCopying

public boolean isCurrentlyCopying()

Method determines if this table is currently copying values.

A-513
Returns:

True is returned if copying is currently being used.

isCurrentlyPasting

public boolean isCurrentlyPasting()

Method determines if this table is currently copying values.

Returns:

True is returned if copying is currently being used.

cancelTableEditing

public void cancelTableEditing()

stopTableEditing

public void stopTableEditing()

getDefaultEditor

public TableCellEditor getDefaultEditor(Class clss)

getCellEditor

public TableCellEditor getCellEditor(int row,

 int column)

addNotify

public void addNotify()

removeNotify

public void removeNotify()

A-514
com.cafean.client.ui

Class RealEditor

java.lang.Object

 |

 +-javax.swing.AbstractCellEditor

 |

 +-javax.swing.DefaultCellEditor

 |

 +-com.cafean.client.ui.RealEditor

public class RealEditor

extends DefaultCellEditor

implements TableCellEditor, TreeCellEditor, CellEditor, java.io.Serializable, ModelDependent

RealEditor is a TableCellEditor that edits Real values stored inside a JTable. RealEditor is actually a wrapper for a RealTextField that

actually handles editing the Real value. RealEditor overrides getCellEditorValue and returns the value from the RealTextField.

All Implemented Interfaces:

ModelDependent, java.io.Serializable, CellEditor, TreeCellEditor, TableCellEditor

See Also:

Real, RealTextField

Constructor Summary

public RealEditor()

This constructor for a new RealEditor will create its own RealTextField.

public RealEditor(RealTextField field)

This constructor for a new RealEditor

Method Summary

boolean doMultiEdit()

Object getCellEditorValue()

This gets the value from the RealTextField.

AbstractModel getModel()

java.awt.Component getTableCellEditorComponent(JTable table, Object value, boolean

isSelected, int row, int column)

delegates to javax.swing.DefaultCellEditor and sets the returned component's font to

the table's font.

void setModel(AbstractModel model)

static void setUpEditor(JTable table, int fromCol, int toCol, String[] line1,

String[] line2, MultiLineHeaderRenderer headerRenderer)

This sets up a table with RealEditors between the specified columns.

A-515
static void setUpRealEditor(JTable table)

This fills all the columns in a JTable with RealEditors.

static void setUpRealEditor(JTable table, AbstractModel model)

This fills all the columns in a JTable with RealEditors.

Methods inherited from class javax.swing.DefaultCellEditor

cancelCellEditing, getCellEditorValue, getClickCountToStart, getComponent,

getTableCellEditorComponent, getTreeCellEditorComponent, isCellEditable,

setClickCountToStart, shouldSelectCell, stopCellEditing

Methods inherited from class javax.swing.AbstractCellEditor

addCellEditorListener, cancelCellEditing, getCellEditorListeners, isCellEditable,

removeCellEditorListener, shouldSelectCell, stopCellEditing

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface javax.swing.CellEditor

addCellEditorListener, cancelCellEditing, getCellEditorValue, isCellEditable,

removeCellEditorListener, shouldSelectCell, stopCellEditing

Methods inherited from interface javax.swing.table.TableCellEditor

getTableCellEditorComponent

Methods inherited from interface javax.swing.CellEditor

addCellEditorListener, cancelCellEditing, getCellEditorValue, isCellEditable,

removeCellEditorListener, shouldSelectCell, stopCellEditing

Methods inherited from interface javax.swing.tree.TreeCellEditor

getTreeCellEditorComponent

Methods inherited from interface javax.swing.CellEditor

addCellEditorListener, cancelCellEditing, getCellEditorValue, isCellEditable,

removeCellEditorListener, shouldSelectCell, stopCellEditing

Methods inherited from interface com.cafean.client.analysis.ModelDependent

getModel, setModel

Constructors

A-516
RealEditor

public RealEditor()

This constructor for a new RealEditor will create its own RealTextField. This is for use inside Tables where the RealTextField

doesn't need a parent.

RealEditor

public RealEditor(RealTextField field)

This constructor for a new RealEditor

Parameters:

textField - the RealTextField that will actually edit the value.

Methods

getCellEditorValue

public Object getCellEditorValue()

This gets the value from the RealTextField. If the text returned is not a valid floating point number, the Real returned is

Unknown.

Returns:

the Real value form the RealTextField, or a Real set unknown.

setUpRealEditor

public static void setUpRealEditor(JTable table)

This fills all the columns in a JTable with RealEditors.

Parameters:

table - the JTable that is being filled.

setUpRealEditor

public static void setUpRealEditor(JTable table,

 AbstractModel model)

This fills all the columns in a JTable with RealEditors.

Parameters:

table - the JTable that is being filled.

model - the AbstractModel that contains the current units.

A-517
setUpEditor

public static void setUpEditor(JTable table,

 int fromCol,

 int toCol,

 String[] line1,

 String[] line2,

 MultiLineHeaderRenderer headerRenderer)

This sets up a table with RealEditors between the specified columns.

Parameters:

table - the JTable that is being setup.

fromCol - the first column that should have RealEditors.

toCol - the last column that should have RealEditors.

line1 - the String[] that contains the first line for all of the column headers.

line2 - the String[] that contains the second line for all of the clumn headers.

headerRenderer - a MultiLineHeaderRenderer for the table.

doMultiEdit

public boolean doMultiEdit()

getTableCellEditorComponent

public java.awt.Component getTableCellEditorComponent(JTable table,

 Object value,

 boolean isSelected,

 int row,

 int column)

delegates to javax.swing.DefaultCellEditor and sets the returned component's font to the table's font.

getModel

public AbstractModel getModel()

setModel

public void setModel(AbstractModel model)

A-518
com.cafean.client.ui

Class RealRenderer

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JLabel

 |

 +-com.cafean.client.ui.RealRenderer

public class RealRenderer

extends JLabel

implements SwingConstants, javax.accessibility.Accessible, java.io.Serializable, HasGetTransferHandler,

java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, TableCellRenderer

A renderer for use in rendering a Real value in a JTable. This renderer should be paired with RealEditor if the value is editable.

All Implemented Interfaces:

TableCellRenderer, java.io.Serializable, java.awt.MenuContainer, java.awt.image.ImageObserver,

HasGetTransferHandler, java.io.Serializable, javax.accessibility.Accessible, SwingConstants

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Fields inherited from interface javax.swing.SwingConstants

BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT,

SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST

Constructor Summary

public RealRenderer()

creates a new renderer

public RealRenderer(int alignment)

creates a new renderer with a default horizontal alignment already set.

A-519
Method Summary

java.awt.Component getTableCellRendererComponent(JTable table, Object value, boolean

isSelected, boolean hasFocus, int row, int column)

Returns the component used for drawing the cell.

void setDisabledCellsGray(boolean option)

Method determines if cells which return !isCellEditable should be painted gray.

void setDisabledTextVisible(boolean option)

Method determines if cells which return !isCellEditable should have painted values.

Methods inherited from class javax.swing.JLabel

getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex,

getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor,

getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition,

imageUpdate, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic,

setDisplayedMnemonicIndex, setHorizontalAlignment, setHorizontalTextPosition, setIcon,

setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment,

setVerticalTextPosition, updateUI

Methods inherited from class javax.swing.JComponent

addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

A-520
add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-521
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-522
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface javax.swing.table.TableCellRenderer

getTableCellRendererComponent

Constructors

RealRenderer

public RealRenderer()

creates a new renderer

RealRenderer

public RealRenderer(int alignment)

creates a new renderer with a default horizontal alignment already set.

Methods

setDisabledCellsGray

public void setDisabledCellsGray(boolean option)

Method determines if cells which return !isCellEditable should be painted gray.

Parameters:

option - the boolean used to disable or enabled grayout.

setDisabledTextVisible

public void setDisabledTextVisible(boolean option)

Method determines if cells which return !isCellEditable should have painted values.

Parameters:

option - the boolean used to disable or enabled disabled text.

A-523
getTableCellRendererComponent

public java.awt.Component getTableCellRendererComponent(JTable table,

 Object value,

 boolean isSelected,

 boolean hasFocus,

 int row,

 int column)

Returns the component used for drawing the cell. This method is used to configure the renderer appropriately before drawing.

Parameters:

table - the JTable that is asking the renderer to draw; can be null

value - the value of the cell to be rendered. It is up to the specific renderer to interpret and draw the value. For example,

if value is the string "true", it could be rendered as a string or it could be rendered as a check box that is checked. null is

a valid value

isSelected - true if the cell is to be rendered with the selection highlighted; otherwise false

hasFocus - if true, render cell appropriately. For example, put a special border on the cell, if the cell can be edited, render

in the color used to indicate editing

row - the row index of the cell being drawn. When drawing the header, the value of row is -1

column - the column index of the cell being drawn

A-524
com.cafean.client.ui

Class RealTextField

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.text.JTextComponent

 |

 +-javax.swing.JTextField

 |

 +-com.cafean.client.ui.RealTextField

public class RealTextField

extends JTextField

implements SwingConstants, Scrollable, javax.accessibility.Accessible, java.io.Serializable,

HasGetTransferHandler, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable,

InsertErrorListener, java.io.Serializable, java.awt.datatransfer.ClipboardOwner, ModelDependent

The RealTextField is a JTextField that is specialized for working with Real values and extensions from the Number package. A

RealTextField is created like a regular TextField. However, getValue() returns a Real Object instead of a String Object. The default

Real is dimensionless, so storing the entered value into a value with units should involve a convert( double value ) call on the

target to preserve the entered value.

All Implemented Interfaces:

ModelDependent, java.awt.datatransfer.ClipboardOwner, java.io.Serializable, InsertErrorListener, java.io.Serializable,

java.awt.MenuContainer, java.awt.image.ImageObserver, HasGetTransferHandler, java.io.Serializable,

javax.accessibility.Accessible, Scrollable, SwingConstants

Fields inherited from class javax.swing.JTextField

notifyAction

Fields inherited from class javax.swing.text.JTextComponent

DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

A-525
Fields inherited from interface javax.swing.SwingConstants

BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT,

SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST

Constructor Summary

public RealTextField()

Creates a default textfield with a null string, 0 columns, and a null DecimalFormat.

public RealTextField(int alignment)

Creates a default textfield with a null string, 0 columns, and a null DecimalFormat.

public RealTextField(String text, int columns, java.text.DecimalFormat format)

public RealTextField(String text, int columns, java.text.DecimalFormat format,

boolean addListener)

This constructor allows for the MouseListener that opens the right click menu for the text field

to be disabled.

public RealTextField(int columns, java.text.DecimalFormat format)

Creates a textfield with an inital null String as text, and the specified number of columns and

format.

public RealTextField(String text)

Creates a textfield with the specified text, 0 columns and a null DecimalFormat

public RealTextField(String text, int columns)

Creates a textfield with the specified text, the specified number of columns, and a null

DecimalFormat

Method Summary

void formatChanged()

This function is called when the document changes format

Double getDoubleValue()

This attempts to return the value inside this RealTextField as a Double.

java.text.DecimalForm

at

getFormat()

Getter for the DecimalFormat of this RealTextField.

Long getLongValue()

This attempts to return the value inside this RealTextField as a Long.

AbstractModel getModel()

Number getNumberValue()

This attempts to return the value inside this RealTextField as a Number.

Real getValue()

This attempts to return the value inside this RealTextField as a Real.

A-526
void insertFailed(NumericPlainDocument doc, int offset, String str,

AttributeSet a)

This function is overridden to hanadle an error that occurs during insertion.

boolean isUncertain()

Determines if the current value in the RealTextField is uncertain.

boolean isUnknown()

This method is used to determine whether the value inside this RealTextField is a known value.

void lostOwnership(java.awt.datatransfer.Clipboard clipboard,

java.awt.datatransfer.Transferable contents)

void normalize()

Formats the String in the RealTextField to the specified DecimalFormat.

void setAllowNumerics(boolean allow)

when set to true, this real text field will allow the selection and specification of user defined

numerics

void setFormat(java.text.DecimalFormat format)

Sets the DecimalFormat on this RealTextField.

void setModel(AbstractModel model)

void setText(String text)

void setValue(double d)

Sets the value of the current RealTextField to the specified double

void setValue(long l)

Sets the value of the current RealTextField to the specified long

void setValue(Number number)

Sets the value of the current RealTextField to the specified Number

void setValue(Real r)

Sets the value of the current RealTextField to the specified Real value.

void setValueUncertain()

If the RealTextField represents multiple sources of data that differ, the value is considered

uncertain.

void setValueUnknown()

Sets the value of the current RealTextField to Unknown

String toString()

Returns the current value of the RealTextField as a String.

Methods inherited from class javax.swing.JTextField

A-527
addActionListener, getAccessibleContext, getAction, getActionListeners, getActions,

getColumns, getHorizontalAlignment, getHorizontalVisibility, getPreferredSize,

getScrollOffset, getUIClassID, isValidateRoot, postActionEvent, removeActionListener,

scrollRectToVisible, setAction, setActionCommand, setColumns, setDocument, setFont,

setHorizontalAlignment, setScrollOffset

Methods inherited from class javax.swing.text.JTextComponent

addCaretListener, addInputMethodListener, addKeymap, copy, cut, getAccessibleContext,

getActions, getCaret, getCaretColor, getCaretListeners, getCaretPosition,

getDisabledTextColor, getDocument, getDragEnabled, getDropLocation, getDropMode,

getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap,

getMargin, getNavigationFilter, getPreferredScrollableViewportSize, getPrintable,

getScrollableBlockIncrement, getScrollableTracksViewportHeight,

getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedText,

getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText,

getText, getToolTipText, getUI, isEditable, loadKeymap, modelToView, moveCaretPosition,

paste, print, print, print, read, removeCaretListener, removeKeymap, removeNotify,

replaceSelection, select, selectAll, setCaret, setCaretColor, setCaretPosition,

setComponentOrientation, setDisabledTextColor, setDocument, setDragEnabled, setDropMode,

setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin,

setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd,

setSelectionStart, setText, setUI, updateUI, viewToModel, write

Methods inherited from class javax.swing.JComponent

addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

A-528
Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-529
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-530
getTransferHandler

Methods inherited from interface javax.swing.Scrollable

getPreferredScrollableViewportSize, getScrollableBlockIncrement,

getScrollableTracksViewportHeight, getScrollableTracksViewportWidth,

getScrollableUnitIncrement

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface com.cafean.client.ui.NumericPlainDocument.InsertErrorListener

insertFailed

Methods inherited from interface java.awt.datatransfer.ClipboardOwner

lostOwnership

Methods inherited from interface com.cafean.client.analysis.ModelDependent

getModel, setModel

Constructors

RealTextField

public RealTextField()

Creates a default textfield with a null string, 0 columns, and a null DecimalFormat.

RealTextField

public RealTextField(int alignment)

Creates a default textfield with a null string, 0 columns, and a null DecimalFormat. This also sets the default horizontal

alignment.

RealTextField

public RealTextField(String text,

 int columns,

 java.text.DecimalFormat format)

Parameters:

text - the initial text to appear in the textfield

columns - the number of columns to appear in the textfield

format - the DecimalFormat to display the numbers in the textfield

A-531
RealTextField

public RealTextField(String text,

 int columns,

 java.text.DecimalFormat format,

 boolean addListener)

This constructor allows for the MouseListener that opens the right click menu for the text field to be disabled.

Parameters:

text - the initial text to appear in the textfield

columns - the number of columns to appear in the textfield

format - the DecimalFormat to display the numbers in the textfield

addListener - boolean flag for disabling the MouseListener

RealTextField

public RealTextField(int columns,

 java.text.DecimalFormat format)

Creates a textfield with an inital null String as text, and the specified number of columns and format.

RealTextField

public RealTextField(String text)

Creates a textfield with the specified text, 0 columns and a null DecimalFormat

RealTextField

public RealTextField(String text,

 int columns)

Creates a textfield with the specified text, the specified number of columns, and a null DecimalFormat

Methods

setFormat

public void setFormat(java.text.DecimalFormat format)

Sets the DecimalFormat on this RealTextField.

Parameters:

format - the DecimalFormat required for the RealTextField.

getFormat

public java.text.DecimalFormat getFormat()

Getter for the DecimalFormat of this RealTextField.

Returns:

the DecimalFormat.

A-532
formatChanged

public void formatChanged()

This function is called when the document changes format

isUnknown

public boolean isUnknown()

This method is used to determine whether the value inside this RealTextField is a known value.

Returns:

TRUE if the value in the RealTextField is unknown.

setText

public void setText(String text)

getLongValue

public Long getLongValue()

 throws java.text.ParseException

This attempts to return the value inside this RealTextField as a Long. If the value cannot be converted it throws a

ParseException.

Returns:

the value of the RealTextField as a Long

Throws:

a - ParseException if the value in the textfield cannot be parsed as a Long

getDoubleValue

public Double getDoubleValue()

 throws java.text.ParseException

This attempts to return the value inside this RealTextField as a Double. If the value cannot be converted it throws a

ParseException.

Returns:

the value of the RealTextField as a Double

Throws:

a - ParseException if the value in the textfield cannot be parsed as a Double

getNumberValue

public Number getNumberValue()

 throws java.text.ParseException

A-533
This attempts to return the value inside this RealTextField as a Number. If the value cannot be converted it throws a

ParseException.

Returns:

the value of the textfield as a Number

Throws:

a - ParseException if the value in the textfield cannot be parsed as a Number

getValue

public Real getValue()

 throws java.text.ParseException

This attempts to return the value inside this RealTextField as a Real. If the value cannot be converted it throws a

ParseException.

Returns:

the value of the textfield as a Real

Throws:

a - ParseException if the value in the textfield cannot be parsed as a Real

setValueUnknown

public void setValueUnknown()

Sets the value of the current RealTextField to Unknown

setValue

public void setValue(Number number)

Sets the value of the current RealTextField to the specified Number

Parameters:

number - the Number to be set in the RealTextField.

setValue

public void setValue(long l)

Sets the value of the current RealTextField to the specified long

Parameters:

l - the long to be set in the RealTextField.

setValue

public void setValue(double d)

Sets the value of the current RealTextField to the specified double

Parameters:

d - the double to be set in the RealTextField.

A-534
setValue

public void setValue(Real r)

Sets the value of the current RealTextField to the specified Real value.

Parameters:

r - the Real to be set in the RealTextField.

normalize

public void normalize()

 throws java.text.ParseException

Formats the String in the RealTextField to the specified DecimalFormat.

insertFailed

public void insertFailed(NumericPlainDocument doc,

 int offset,

 String str,

 AttributeSet a)

This function is overridden to hanadle an error that occurs during insertion.

Parameters:

doc - the NumericPlainDocument being edited.

offset - the current index in the string where the error occured.

str - the String that is in the TextField.

toString

public String toString()

Returns the current value of the RealTextField as a String.

Returns:

the text String of the RealTextField

setValueUncertain

public void setValueUncertain()

If the RealTextField represents multiple sources of data that differ, the value is considered uncertain. the Text that is displayed

is multiple stars. This sets the value stored to be uncertain.

isUncertain

public boolean isUncertain()

Determines if the current value in the RealTextField is uncertain.

Returns:

TRUE if the value is uncertain.

A-535
setAllowNumerics

public void setAllowNumerics(boolean allow)

when set to true, this real text field will allow the selection and specification of user defined numerics

lostOwnership

public void lostOwnership(java.awt.datatransfer.Clipboard clipboard,

 java.awt.datatransfer.Transferable contents)

getModel

public AbstractModel getModel()

setModel

public void setModel(AbstractModel model)

A-536
com.cafean.client.ui

Interface RefreshableDialog

public interface RefreshableDialog

extends 

An interface describing a Dialog extension whos data and/or structure can be refreshed directly based on a change of the currently

displayed units type or a global refresh.

All Known Implementing Classes:

AsciiViewer

Method Summary

void refresh()

Refreshes and redisplays this dialog's data

void unitsChanged()

Indicates that the currently displayed units type has changed and updates this dialogs display.

Methods

unitsChanged

public void unitsChanged()

Indicates that the currently displayed units type has changed and updates this dialogs display.

refresh

public void refresh()

Refreshes and redisplays this dialog's data

A-537
com.cafean.client.ui

Class SnapPreferences

java.lang.Object

 |

 +-com.cafean.utils.Configurator

 |

 +-com.cafean.client.ui.SnapPreferences

public class SnapPreferences

extends Configurator

implements ComponentElement, PropertyController

All Implemented Interfaces:

PropertyController, ComponentElement

Field Summary

public static final DCB_MINI_NAV

a behavior enumeration that indicates that double-clicking a DrawnComponent will open a

MiniNavigator for that component

Value: 2

public static final DCB_NAV_SELECT

a behavior enumeration that indicates that double-clicking a DrawnComponent will select that

component in the Navigator.

Value: 1

public static final Num_Databases

Value: 5

public static final SESSION_ALWAYS

the enumerated session mode where the session is always restored when the ModelEditor is

launched

Value: 1

public static final SESSION_NAMES

public static final SESSION_NEVER

the enumerated session mode where the session is never restored when the ModelEditor is

launched

Value: 2

public static final SESSION_PROMPT

the enumerated session mode where the user is asked if the previous session should be restored

when the ModelEditor is launched

Value: 0

public static final SESSION_VALUES

A-538
public static final VIEW_SEL_IND

Value: 1

public static final VIEW_SEL_NAV

Value: 3

public static final VIEW_SEL_NAV1

Value: 2

public static final WINDOW_MULTIPLE

the enumerated windowing arrangement mode where each major UI region will have it's own

Frame.

Value: 1

public static final WINDOW_NAMES

public static final WINDOW_NAVIGATOR_ABOVE_PROPERTIES

the enumerated windowing arrangement mode where the Navigator is placed above the

Property View.

Value: 2

public static final WINDOW_NAVIGATOR_BESIDE_PROPERTIES

the enumerated windowing arrangement mode where the Navigator is placed to the left of the

Property View

Value: 3

public static final WINDOW_SINGLE

Deprecated. There is now no longer one 'single-window' mode, but several. This value exists

as an alias of WINDOW_NAVIGATOR_ABOVE_PROPERTIES

Value: 2

public static final WINDOW_VALUES

Fields inherited from interface com.cafean.client.ui.beans.PropertyController

ALL, COLOR_OPTIONAL, DISABLED, NONE, OPTIONAL, REQUIRED

Constructor Summary

public SnapPreferences()

Method Summary

boolean areComponentsScaled()

static String getAttributeGroup(String property)

Retrieves the name of the Attribute Group for the given property name.

A-539
static String[] getAttributeGroups()

Retrieves the Attribute Group Names for this preferences object.

int getAttributeIndex(String propertyName)

static String[] getAttributesForGroup(String groupName)

Retrieves the Attribute Names for the given group.

java.awt.Color getBaseErrorColor()

java.awt.Color getBaseHeatedColor()

java.awt.Color getBaseIncompleteColor()

java.awt.Color getBaseNormalColor()

java.awt.Color getBaseNormCsColor()

java.awt.Color getBasePoweredColor()

Getter for property poweredColorBase.

java.awt.Color getBaseSelectedColor()

java.awt.Color getBaseSpecialColor()

java.awt.Color getBaseWarningColor()

java.awt.Font getCanvasFont()

java.awt.Font getCanvasFontItalic()

java.awt.FontMetrics getCanvasFontItalicMetrics()

java.awt.FontMetrics getCanvasFontMetrics()

AbstractComponent getComponent()

java.awt.Color getConnectionColor()

int getConnectionSize()

int getDefaultUnits()

Getter for the default model units.

int getDoubleClickBehavior()

Retrieves the double-click behavior as either DCB_NAV_SELECT or DCB_MINI_NAV

A-540
java.awt.Color getErrorColor()

int getHandleSize()

java.awt.Color getHeatedColor()

java.awt.Color getIncompleteColor()

java.io.File getLastPath(String name)

Loads a file from the model editor module.

java.io.File getLastPath(String module, String name)

Loads a file from the given module module.

int getLayoutIterations()

Getter for property layoutIterations.

java.awt.Font getMessageFont()

AbstractModel getModel()

java.awt.Color getNormalColor()

java.awt.Color getNormCsColor()

ComponentElement getOwner()

java.awt.Color getPoweredColor()

Getter for property poweredColor.

boolean getScaleComponents()

java.awt.Color getSelectedColor()

int getSessionMode()

Retrieves the current session mode as one of the above SESSION_* enumerations.

boolean getShowCreateViewDialog()

Returns true if the Create Views dialog should be shown when a model is imported.

boolean getShowWelcomeDialog()

Returns true if the welcome dialog should be shown when a the ModelEditor is opened.

java.awt.Color getSpecialColor()

int getTabLayout()

Getter for property tabLayout.

int getViewSelectionMode()

A-541
java.awt.Color getWarningColor()

int getWindowingMode()

retrieves the current windowing arrangement mode as one of the above WINDOW_*

enumerations.

String getXpdfPath()

sets the path to the XPDF executable used by the PDFViewer

boolean isDatabaseConfigured()

Deprecated. Snap Version 0.25.0 September 17th 2006

boolean isJeditAvailable()

Returns true if the "jEdit Executable" property is defined and refers to an existing file.

boolean isPropertyActive(String propertyName)

boolean isPropertyEnabled(String propertyName)

boolean isPropertyRequired(String propertyName)

boolean isPropertyResizable(String propertyName)

boolean isPropertyRestartEditable(String propertyName)

boolean isRestartResizable(String propertyName)

boolean isSingleFrame()

Returns true if the current windowing mode is a single window mode.

boolean isUnlockedAA()

returns true if the DrawnView will use antialiasing when unlocked

boolean load()

static

java.awt.TexturePaint

makeBumpyTexture(java.awt.Color drawColor)

void resetModule()

boolean save()

void setBaseErrorColor(java.awt.Color errorColor)

void setBaseHeatedColor(java.awt.Color heatedColor)

void setBaseIncompleteColor(java.awt.Color incompleteColor)

void setBaseNormalColor(java.awt.Color normalColor)

A-542
void setBaseNormCsColor(java.awt.Color normCsColor)

void setBasePoweredColor(java.awt.Color poweredColor)

void setBaseSelectedColor(java.awt.Color selectedColor)

void setBaseSpecialColor(java.awt.Color specialColor)

void setBaseWarningColor(java.awt.Color warningColor)

void setCanvasFont(java.awt.Font font)

void setConnectionColor(java.awt.Color c)

void setConnectionSize(int i)

void setDefaultUnits(int val_)

Setter for the default model units.

void setDoubleClickBehavior(int doubleClickBehavior)

Sets the double-click behavior as either DCB_NAV_SELECT or DCB_MINI_NAV

void setErrorColor(java.awt.Color c)

void setHandleSize(int i)

void setHeatedColor(java.awt.Color c)

void setIncompleteColor(java.awt.Color c)

void setLastPath(String name, java.io.File last)

Stores the given file path into the "Model Editor" module with the name "Last " + name + "

File".

void setLastPath(String module, String name, java.io.File last)

Stores the given file path into a module with the name "Last " + name + " File".

void setLayoutIterations(int val_)

Setter for property layoutIterations.

void setNormalColor(java.awt.Color c)

void setNormCsColor(java.awt.Color c)

void setPoweredColor(java.awt.Color c)

void setScaleComponents(boolean flag)

A-543
void setSelectedColor(java.awt.Color c)

void setSessionMode(int mode)

Sets the current session mode as one of the above SESSION_* enumerations.

void setShowCreateViewDialog(boolean show)

Set to true if the Create Views dialog should be shown when a model is imported.

void setShowHS_connections(boolean flag)

void setShowWelcomeDialog(boolean show)

Set to true if the welcome dialog should be shown when a the ModelEditor is opened.

void setSpecialColor(java.awt.Color c)

void setTabLayout(int val_)

Setter for property tabLayout.

void setUnlockedAA(boolean unlockedAA)

if set to true the DrawnView will use antialiasing when unlocked

void setViewSelectionMode(int viewSelectionMode)

void setWarningColor(java.awt.Color c)

void setWindowingMode(int mode)

sets the current windowing arrangement mode as one of the above WINDOW_* enumerations.

void setXpdfPath(String path)

gets the path to the XPDF executable used by the PDFViewer

boolean ShowHS_connections()

Methods inherited from class com.cafean.utils.Configurator

addCodeInfos, addServer, destroy, getCodeInfos, getColor, getColor, getColor, getColor,

getConfigFileDir, getConfigFileName, getDividerLocation, getDividerLocation, getFont,

getFont, getFont, getGeometry, getGeometry, getGeometry, getGeometry, getGeometry,

getGeometry, getGeometry, getLocalServer, getNrcDBServer, getProperty, getProperty,

getProperty, getServers, getWebSupport, reDirectStdErrOut, removeAllCodeInfos,

removeAllServers, removeProperty, removeProperty, removeServer, save, setColor,

setColor, setDividerLocation, setDividerLocation, setFont, setFont, setGeometry,

setGeometry, setGeometry, setLookAndFeel, setModule, setNrcDBServer, setProperty,

setProperty, setWebSupport, updateAvailable, updateLookAndFeel

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface com.cafean.client.analysis.ComponentElement

getComponent, getOwner

A-544
Methods inherited from interface com.cafean.client.analysis.ModelElement

getModel

Methods inherited from interface com.cafean.client.ui.beans.PropertyController

getAttributeIndex, isPropertyActive, isPropertyEnabled, isPropertyRequired,

isPropertyResizable, isPropertyRestartEditable, isRestartResizable

Fields

WINDOW_MULTIPLE

public static final int WINDOW_MULTIPLE

the enumerated windowing arrangement mode where each major UI region will have it's own Frame.

Constant value: 1

WINDOW_NAVIGATOR_ABOVE_PROPERTIES

public static final int WINDOW_NAVIGATOR_ABOVE_PROPERTIES

the enumerated windowing arrangement mode where the Navigator is placed above the Property View.

Constant value: 2

WINDOW_NAVIGATOR_BESIDE_PROPERTIES

public static final int WINDOW_NAVIGATOR_BESIDE_PROPERTIES

the enumerated windowing arrangement mode where the Navigator is placed to the left of the Property View

Constant value: 3

SESSION_PROMPT

public static final int SESSION_PROMPT

the enumerated session mode where the user is asked if the previous session should be restored when the ModelEditor is

launched

Constant value: 0

SESSION_ALWAYS

public static final int SESSION_ALWAYS

the enumerated session mode where the session is always restored when the ModelEditor is launched

Constant value: 1

SESSION_NEVER

public static final int SESSION_NEVER

the enumerated session mode where the session is never restored when the ModelEditor is launched

A-545
Constant value: 2

WINDOW_SINGLE

public static final int WINDOW_SINGLE

Deprecated. There is now no longer one 'single-window' mode, but several. This value exists as an alias of

WINDOW_NAVIGATOR_ABOVE_PROPERTIES

The enumerated windowing arrangement mode that indicates that all major UI portions use a single Frame.

Constant value: 2

WINDOW_VALUES

public static final int WINDOW_VALUES

WINDOW_NAMES

public static final java.lang.String WINDOW_NAMES

SESSION_VALUES

public static final int SESSION_VALUES

SESSION_NAMES

public static final java.lang.String SESSION_NAMES

Num_Databases

public static final int Num_Databases

Constant value: 5

DCB_NAV_SELECT

public static final int DCB_NAV_SELECT

a behavior enumeration that indicates that double-clicking a DrawnComponent will select that component in the Navigator.

Constant value: 1

DCB_MINI_NAV

public static final int DCB_MINI_NAV

a behavior enumeration that indicates that double-clicking a DrawnComponent will open a MiniNavigator for that component

A-546
Constant value: 2

VIEW_SEL_IND

public static final int VIEW_SEL_IND

Constant value: 1

VIEW_SEL_NAV1

public static final int VIEW_SEL_NAV1

Constant value: 2

VIEW_SEL_NAV

public static final int VIEW_SEL_NAV

Constant value: 3

Constructors

SnapPreferences

public SnapPreferences()

Methods

resetModule

public void resetModule()

load

public boolean load()

save

public boolean save()

Saves the currently loaded configuration to the user's .snaprc. Only modules that have data that changed are saved.

isJeditAvailable

public boolean isJeditAvailable()

A-547
Returns true if the "jEdit Executable" property is defined and refers to an existing file.

getDoubleClickBehavior

public int getDoubleClickBehavior()

Retrieves the double-click behavior as either DCB_NAV_SELECT or DCB_MINI_NAV

setDoubleClickBehavior

public void setDoubleClickBehavior(int doubleClickBehavior)

Sets the double-click behavior as either DCB_NAV_SELECT or DCB_MINI_NAV

areComponentsScaled

public boolean areComponentsScaled()

setScaleComponents

public void setScaleComponents(boolean flag)

getScaleComponents

public boolean getScaleComponents()

ShowHS_connections

public boolean ShowHS_connections()

setShowHS_connections

public void setShowHS_connections(boolean flag)

getHandleSize

public int getHandleSize()

setHandleSize

public void setHandleSize(int i)

A-548
getConnectionSize

public int getConnectionSize()

setConnectionSize

public void setConnectionSize(int i)

getNormalColor

public java.awt.Color getNormalColor()

getNormCsColor

public java.awt.Color getNormCsColor()

getWarningColor

public java.awt.Color getWarningColor()

getErrorColor

public java.awt.Color getErrorColor()

getIncompleteColor

public java.awt.Color getIncompleteColor()

getSelectedColor

public java.awt.Color getSelectedColor()

getSpecialColor

public java.awt.Color getSpecialColor()

A-549
getHeatedColor

public java.awt.Color getHeatedColor()

getConnectionColor

public java.awt.Color getConnectionColor()

getBaseNormalColor

public java.awt.Color getBaseNormalColor()

getBaseNormCsColor

public java.awt.Color getBaseNormCsColor()

getBaseWarningColor

public java.awt.Color getBaseWarningColor()

getBaseErrorColor

public java.awt.Color getBaseErrorColor()

getBaseIncompleteColor

public java.awt.Color getBaseIncompleteColor()

getBaseSelectedColor

public java.awt.Color getBaseSelectedColor()

getBaseSpecialColor

public java.awt.Color getBaseSpecialColor()

A-550
getBaseHeatedColor

public java.awt.Color getBaseHeatedColor()

setBaseNormalColor

public void setBaseNormalColor(java.awt.Color normalColor)

setBaseNormCsColor

public void setBaseNormCsColor(java.awt.Color normCsColor)

setBaseWarningColor

public void setBaseWarningColor(java.awt.Color warningColor)

setBaseErrorColor

public void setBaseErrorColor(java.awt.Color errorColor)

setBaseIncompleteColor

public void setBaseIncompleteColor(java.awt.Color incompleteColor)

setBaseSelectedColor

public void setBaseSelectedColor(java.awt.Color selectedColor)

setBaseSpecialColor

public void setBaseSpecialColor(java.awt.Color specialColor)

setBaseHeatedColor

public void setBaseHeatedColor(java.awt.Color heatedColor)

A-551
setNormalColor

public void setNormalColor(java.awt.Color c)

setNormCsColor

public void setNormCsColor(java.awt.Color c)

setWarningColor

public void setWarningColor(java.awt.Color c)

setErrorColor

public void setErrorColor(java.awt.Color c)

setIncompleteColor

public void setIncompleteColor(java.awt.Color c)

setSelectedColor

public void setSelectedColor(java.awt.Color c)

setSpecialColor

public void setSpecialColor(java.awt.Color c)

setHeatedColor

public void setHeatedColor(java.awt.Color c)

setConnectionColor

public void setConnectionColor(java.awt.Color c)

A-552
getCanvasFont

public java.awt.Font getCanvasFont()

setCanvasFont

public void setCanvasFont(java.awt.Font font)

getCanvasFontItalic

public java.awt.Font getCanvasFontItalic()

getCanvasFontItalicMetrics

public java.awt.FontMetrics getCanvasFontItalicMetrics()

getCanvasFontMetrics

public java.awt.FontMetrics getCanvasFontMetrics()

makeBumpyTexture

public static java.awt.TexturePaint makeBumpyTexture(java.awt.Color drawColor)

getMessageFont

public java.awt.Font getMessageFont()

getLastPath

public java.io.File getLastPath(String module,

 String name)

Loads a file from the given module module. This does not use the current module but specifically obtains the property from the

given module. This will return null if the property does not exist.

Parameters:

module - the name of the module with the requested path.

A-553
name - the name of the file to obtain.

getLastPath

public java.io.File getLastPath(String name)

Loads a file from the model editor module. This does not use the current module but specifically obtains the property from the

Model Editor module. This will return null if the property does not exist.

Parameters:

module - the name of the module with the requested path.

name - the name of the file to obtain.

setLastPath

public void setLastPath(String module,

 String name,

 java.io.File last)

Stores the given file path into a module with the name "Last " + name + " File". This will specifically enter the value into the

given module.

setLastPath

public void setLastPath(String name,

 java.io.File last)

Stores the given file path into the "Model Editor" module with the name "Last " + name + " File". This will specifically enter

the value into the "Model Editor" module.

getPoweredColor

public java.awt.Color getPoweredColor()

Getter for property poweredColor.

Returns:

Value of property poweredColor.

setPoweredColor

public void setPoweredColor(java.awt.Color c)

getBasePoweredColor

public java.awt.Color getBasePoweredColor()

Getter for property poweredColorBase.

Returns:

Value of property poweredColorBase.

A-554
setBasePoweredColor

public void setBasePoweredColor(java.awt.Color poweredColor)

setWindowingMode

public void setWindowingMode(int mode)

sets the current windowing arrangement mode as one of the above WINDOW_* enumerations.

getWindowingMode

public int getWindowingMode()

retrieves the current windowing arrangement mode as one of the above WINDOW_* enumerations.

isSingleFrame

public boolean isSingleFrame()

Returns true if the current windowing mode is a single window mode.

setSessionMode

public void setSessionMode(int mode)

Sets the current session mode as one of the above SESSION_* enumerations.

getSessionMode

public int getSessionMode()

Retrieves the current session mode as one of the above SESSION_* enumerations.

getComponent

public AbstractComponent getComponent()

getModel

public AbstractModel getModel()

getOwner

public ComponentElement getOwner()

A-555
getAttributeGroups

public static String[] getAttributeGroups()

Retrieves the Attribute Group Names for this preferences object.

Returns:

a String[] in which each entry is an attribute group name

getAttributeGroup

public static String getAttributeGroup(String property)

Retrieves the name of the Attribute Group for the given property name.

Parameters:

property - a String containing the name of the property

Returns:

a String containg the group name for the given property or null

getAttributesForGroup

public static String[] getAttributesForGroup(String groupName)

Retrieves the Attribute Names for the given group.

Returns:

a String[] containing the attribute names for the given group name or a 0 length String[] if none are found.

getLayoutIterations

public int getLayoutIterations()

Getter for property layoutIterations.

Returns:

Value of property layoutIterations.

setLayoutIterations

public void setLayoutIterations(int val_)

Setter for property layoutIterations.

Parameters:

val_ - New value of property layoutIterations.

getTabLayout

public int getTabLayout()

Getter for property tabLayout.

A-556
setTabLayout

public void setTabLayout(int val_)

Setter for property tabLayout.

getDefaultUnits

public int getDefaultUnits()

Getter for the default model units.

setDefaultUnits

public void setDefaultUnits(int val_)

Setter for the default model units.

getShowCreateViewDialog

public boolean getShowCreateViewDialog()

Returns true if the Create Views dialog should be shown when a model is imported.

setShowCreateViewDialog

public void setShowCreateViewDialog(boolean show)

Set to true if the Create Views dialog should be shown when a model is imported.

getShowWelcomeDialog

public boolean getShowWelcomeDialog()

Returns true if the welcome dialog should be shown when a the ModelEditor is opened.

setShowWelcomeDialog

public void setShowWelcomeDialog(boolean show)

Set to true if the welcome dialog should be shown when a the ModelEditor is opened.

isPropertyEnabled

public boolean isPropertyEnabled(String propertyName)

getXpdfPath

public String getXpdfPath()

sets the path to the XPDF executable used by the PDFViewer

A-557
setXpdfPath

public void setXpdfPath(String path)

gets the path to the XPDF executable used by the PDFViewer

isPropertyRequired

public boolean isPropertyRequired(String propertyName)

isPropertyRestartEditable

public boolean isPropertyRestartEditable(String propertyName)

getAttributeIndex

public int getAttributeIndex(String propertyName)

isPropertyResizable

public boolean isPropertyResizable(String propertyName)

isRestartResizable

public boolean isRestartResizable(String propertyName)

isPropertyActive

public boolean isPropertyActive(String propertyName)

isUnlockedAA

public boolean isUnlockedAA()

returns true if the DrawnView will use antialiasing when unlocked

setUnlockedAA

public void setUnlockedAA(boolean unlockedAA)

if set to true the DrawnView will use antialiasing when unlocked

A-558
getViewSelectionMode

public int getViewSelectionMode()

setViewSelectionMode

public void setViewSelectionMode(int viewSelectionMode)

isDatabaseConfigured

public boolean isDatabaseConfigured()

Deprecated. Snap Version 0.25.0 September 17th 2006

Returns false as the SnapSB server is no longer supported.

A-559
com.cafean.client.ui

Class TableSorter

java.lang.Object

 |

 +-javax.swing.table.AbstractTableModel

 |

 +-com.cafean.client.ui.TableSorter

public class TableSorter

extends AbstractTableModel

implements TableModel, java.io.Serializable, TableModelListener

A sorting wrapper for TableModels to allow sorting by a particular column. 

TableSorter does not store or copy the data in the TableModel, instead it maintains an array of integers which it keeps the same size as

the number of rows in its model.

When the model changes it notifies the sorter that something has changed eg. "rowsAdded" so that its internal array of integers can be

reallocated. As requests are made of the sorter (such as getValueAt(int, int) it redirects them to its model via the mapping array.

That way the TableSorter appears to hold another copy of the table with the rows in a different order. The sorting algorthm used is

stable which means that it does not move around rows when its comparison function returns 0 to denote that they are equivalent.

To use, simply wrap your table model with TableSorter and use getIndexForRow(int) to convert JTable row indicies to your

TableModel's row indicies.

Modified from an example by Philip Milne from java.sun.com swing tutorial

All Implemented Interfaces:

TableModelListener, java.io.Serializable, TableModel

See Also:

addMouseListenerToHeaderInTable(JTable)

Constructor Summary

public TableSorter()

Creates a new instance of Table Sorter

public TableSorter(TableModel model)

Creates an instance of table sorter given a table model

Method Summary

void addMouseListenerToHeaderInTable(JTable table)

Adds a mouse litener to the table header.

void checkModel()

Verifies the current model has the same size as the data stored by the table sorter.

int compare(int row1, int row2)

Compares the values stored in two rows of the table.

A-560
int compareRowsByColumn(int row1, int row2, int column)

Compares the value stored in two rows of a given column.

Class getColumnClass(int aColumn)

Returns the Class of the given column.

int getColumnCount()

Returns the number of columns in the tablemodel.

String getColumnName(int aColumn)

Returns the name of the given column.

int getIndexForRow(int aRow)

Finds the actual index given a specific table row.

TableModel getModel()

Accessor for the TableModel of the JTable this is sorting

int getRowCount()

Returns the number of rows in the tablemodel.

Object getValueAt(int aRow, int aColumn)

Passes through the value stored in the sorted locations.

boolean isCellEditable(int row, int column)

Determines if the cell specified by row and column is editable.

void setModel(TableModel model)

Setter for the TableModel of the JTable this is sorting

void setValueAt(Object aValue, int aRow, int aColumn)

Sets the value stored in the sorted locations.

void sort(Object sender)

Arranges the rows of a table so that they are sorted.

void sortByColumn(int column)

Sorts the table by the given column in ascending order.

void sortByColumn(int column, boolean ascending)

Sorts the table by the given column, in either ascending or decending order.

void tableChanged(TableModelEvent e)

This is implemented to support the TableListener interface the table indecies are reallocated

whenever a table's values change.

Methods inherited from class javax.swing.table.AbstractTableModel

addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged,

fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated,

fireTableStructureChanged, getColumnClass, getColumnName, getListeners,

getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt

Methods inherited from class java.lang.Object

A-561
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface javax.swing.table.TableModel

addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount,

getValueAt, isCellEditable, removeTableModelListener, setValueAt

Methods inherited from interface javax.swing.event.TableModelListener

tableChanged

Constructors

TableSorter

public TableSorter()

Creates a new instance of Table Sorter

TableSorter

public TableSorter(TableModel model)

Creates an instance of table sorter given a table model

Parameters:

model - the TableModel for the JTable this is sorting.

Methods

getModel

public TableModel getModel()

Accessor for the TableModel of the JTable this is sorting

setModel

public void setModel(TableModel model)

Setter for the TableModel of the JTable this is sorting

Returns:

the TableModel.

compareRowsByColumn

public int compareRowsByColumn(int row1,

 int row2,

 int column)

A-562
Compares the value stored in two rows of a given column.

Parameters:

row1 - the index of the first row.

row2 - the index of the second row.

column - the index of the column.

compare

public int compare(int row1,

 int row2)

Compares the values stored in two rows of the table.

Parameters:

row1 - the index of the first row.

row2 - the index of the second row.

tableChanged

public void tableChanged(TableModelEvent e)

This is implemented to support the TableListener interface the table indecies are reallocated whenever a table's values change.

Parameters:

e - the TableModeEvent that was fired.

checkModel

public void checkModel()

Verifies the current model has the same size as the data stored by the table sorter.

Throws:

Exception - if the model has a different number of rows then the local vector.

sort

public void sort(Object sender)

Arranges the rows of a table so that they are sorted.

getValueAt

public Object getValueAt(int aRow,

 int aColumn)

Passes through the value stored in the sorted locations.

Parameters:

aRow - the row index.

aColumn - the column index.

Returns:

the Object stored at the sorted row index for aRow

A-563
setValueAt

public void setValueAt(Object aValue,

 int aRow,

 int aColumn)

Sets the value stored in the sorted locations.

Parameters:

aValue - the Object stored at the sorted row index for aRow.

aRow - the row index.

aColumn - the column index.

getRowCount

public int getRowCount()

Returns the number of rows in the tablemodel.

Returns:

the number of rows in the TableModel or 0 if there isn't a model.

getColumnCount

public int getColumnCount()

Returns the number of columns in the tablemodel.

Returns:

the number of columns in the TableModel or 0 if there isn't a model.

getColumnName

public String getColumnName(int aColumn)

Returns the name of the given column.

Parameters:

aColumn - the index of the column.

Returns:

the String name stored for the column in the table model.

getColumnClass

public Class getColumnClass(int aColumn)

Returns the Class of the given column.

Parameters:

aColumn - the index of the column.

Returns:

the Class stored for the column in the table model.

A-564
isCellEditable

public boolean isCellEditable(int row,

 int column)

Determines if the cell specified by row and column is editable. This is passed on to the TableModel.

Parameters:

row - the row index.

column - the column index.

Returns:

TRUE if the specified cell can be edited.

sortByColumn

public void sortByColumn(int column)

Sorts the table by the given column in ascending order.

Parameters:

column - the column index.

sortByColumn

public void sortByColumn(int column,

 boolean ascending)

Sorts the table by the given column, in either ascending or decending order.

Parameters:

column - the column index.

ascending - If this is TRUE, the table is sorted in ascending order.

getIndexForRow

public int getIndexForRow(int aRow)

Finds the actual index given a specific table row.

Parameters:

aRow - the row index.

addMouseListenerToHeaderInTable

public void addMouseListenerToHeaderInTable(JTable table)

Adds a mouse litener to the table header. If a column is selected, that column gets sorted.

Parameters:

table - the JTable.

A-565
com.cafean.client.ui

Class Toolbox

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JToolBar

 |

 +-com.cafean.client.ui.Toolbox

public class Toolbox

extends JToolBar

The central handler class for a DrawnView's Tools. Tools in this care are the MouseHandler instances that are available in a particular

DrawnView. Examples of these handlers are the Select Tool, Connection Tool, etc.

All Implemented Interfaces:

java.io.Serializable, java.awt.MenuContainer, java.awt.image.ImageObserver, HasGetTransferHandler,

java.io.Serializable, javax.accessibility.Accessible, SwingConstants

Field Summary

public static final CURSOR_MANIP_P

used to indicate the manipulation of points

public static final ICON_ELL_ANNOT

public static final ICON_IMAGE_ANNOT

public static final ICON_LINE_ANNOT

public static final ICON_NEW

public static final ICON_REC_ANNOT

public static final ICON_TXT_ANNOT

public static final TOOL_CONNECT

The enumeration for the Connect tool

Value: 5

public static final TOOL_INSERT

The enumeration for the Insert tool

Value: 4

A-566
public static final TOOL_INTERACTIVE

The enumeration for the Interactive tool

Value: 6

public static final TOOL_NONE

No tool has been selected

Value: 0

public static final TOOL_PAN

The enumeration for the Pan tool

Value: 2

public static final TOOL_SELECT

The enumeration for the select Tool

Value: 1

public static final TOOL_ZOOM

The enumeration for the Zoom tool

Value: 3

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Fields inherited from interface javax.swing.SwingConstants

BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT,

SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST

Constructor Summary

public Toolbox(DrawnView parent)

Creates new Toolbox

Method Summary

void addToolChangeListener(ToolChangeListener listener)

Adds the given listener to the the list to notify when the current tool has changed.

void createBeanSelectionMenu(JMenu menu)

Creates a select menu appropriate for selecting AbstractDisplayBean instances within the

DrawnView parent of this Toolbox.

A-567
JToolBar[] createCategoryToolBars()

Creates a set of JToolBar instances appropriate for allowing quick selection of types for the

Insertion Tool.

static

java.awt.Cursor

createCursor(String resource)

Creates a Cursor from the image referred to by the given resource name.

JComponent[] createDisplayBeans(int pixelsPerMeter, AnimationBeanGenerator dc)

Attempts to create a set of AbstractDisplayBeans from the given AnimationBeanGenerator

using AnimationBeanGenerator.createDisplayBeans(int, double,

java.lang.ClassLoader).

JComponent[] createDisplayBeans(int pixelsPerMeter, double widthScaleFactor,

AnimationBeanGenerator dc)

Attempts to create a set of AbstractDisplayBeans from the given AnimationBeanGenerator

using AnimationBeanGenerator.createDisplayBeans(int, double,

java.lang.ClassLoader).

JComponent createSelected()

Creates an instance of the currently selected component type in the given model and returns a

renderer for the created component.

static Class findDisplayBeanClass(String className)

Retrieves the Class with the given class name in the list of Display Bean classes available.

Category getComponentCategory()

Retrieves the Category of the currently selected component type in the palette of the Toolbox.

java.awt.Cursor getCurrentCursor()

Retrieves the cursor for the views based off of the currently selected tool.

java.awt.Cursor getCurrentCursor(java.awt.event.MouseEvent evt)

Retrieves the cursor for the views based off of the currently selected tool.

int getCurrentTool()

Retrieves the enumerated type of the current tool.

boolean isCompActionSelected()

Returns true if the selected toolbox action will create an AbstractComponent.

static

com.cafean.client.ani

m.AbstractDisplayBean

loadDisplayBean(DrawnDisplayBeanRec rec)

Loads a display bean from the given display bean rec.

static void loadDisplayBeanClasses()

Loads the display beans from the jar files included in the Components directories in both the

current user's home directory and system wide.

boolean loadVedaExport(java.io.File exportedFile)

Attempts to import a VEDA mask dump file.

void removeToolChangeListener(ToolChangeListener listener)

Adds the given listener to the the list to notify when the current tool has changed.

void setCurrentAction(ToolboxAction action)

Sets the current ToolboxAction used for creating new drawings with the Insertion Tool.

A-568
void setCurrentTool(int tool)

switches the toolbox to the given tool.

void setLocked(boolean locked)

Updates the state of this Toolbox to correspond with the given locked state.

static byte[] storeDisplayBean(com.cafean.client.anim.AbstractDisplayBean bean)

XML Encodes the given bean and returns the byte[] result of the encoding.

static boolean verifyBeansAvailable(Vector records)

Verifies that any com.cafean.client.anim.AbstractDisplayBeans stored in the given

Vector as com.cafean.client.io.med.DrawnDisplayBeanRecs have the proper classes

available to be loaded.

Methods inherited from class javax.swing.JToolBar

add, addSeparator, addSeparator, getAccessibleContext, getComponentAtIndex,

getComponentIndex, getMargin, getOrientation, getUI, getUIClassID, isBorderPainted,

isFloatable, isRollover, setBorderPainted, setFloatable, setLayout, setMargin,

setOrientation, setRollover, setUI, updateUI

Methods inherited from class javax.swing.JComponent

addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

A-569
add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-570
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-571
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Fields

TOOL_NONE

public static final int TOOL_NONE

No tool has been selected

Constant value: 0

TOOL_SELECT

public static final int TOOL_SELECT

The enumeration for the select Tool

Constant value: 1

TOOL_PAN

public static final int TOOL_PAN

The enumeration for the Pan tool

Constant value: 2

TOOL_ZOOM

public static final int TOOL_ZOOM

The enumeration for the Zoom tool

Constant value: 3

TOOL_INSERT

public static final int TOOL_INSERT

The enumeration for the Insert tool

Constant value: 4

TOOL_CONNECT

public static final int TOOL_CONNECT

The enumeration for the Connect tool

Constant value: 5

A-572
TOOL_INTERACTIVE

public static final int TOOL_INTERACTIVE

The enumeration for the Interactive tool

Constant value: 6

CURSOR_MANIP_P

public static final java.awt.Cursor CURSOR_MANIP_P

used to indicate the manipulation of points

ICON_NEW

public static final javax.swing.Icon ICON_NEW

ICON_TXT_ANNOT

public static final javax.swing.Icon ICON_TXT_ANNOT

ICON_REC_ANNOT

public static final javax.swing.Icon ICON_REC_ANNOT

ICON_ELL_ANNOT

public static final javax.swing.Icon ICON_ELL_ANNOT

ICON_LINE_ANNOT

public static final javax.swing.Icon ICON_LINE_ANNOT

ICON_IMAGE_ANNOT

public static final javax.swing.Icon ICON_IMAGE_ANNOT

Constructors

Toolbox

public Toolbox(DrawnView parent)

A-573
Creates new Toolbox

Methods

setLocked

public void setLocked(boolean locked)

Updates the state of this Toolbox to correspond with the given locked state. When locked, the insert and connect tools are

disabled.

createCategoryToolBars

public JToolBar[] createCategoryToolBars()

Creates a set of JToolBar instances appropriate for allowing quick selection of types for the Insertion Tool. The buttons

included in these toolbars activate the Insertion Tool and set the currently selected insert type.

createBeanSelectionMenu

public void createBeanSelectionMenu(JMenu menu)

Creates a select menu appropriate for selecting AbstractDisplayBean instances within the DrawnView parent of this Toolbox.

addToolChangeListener

public void addToolChangeListener(ToolChangeListener listener)

Adds the given listener to the the list to notify when the current tool has changed.

Parameters:

listener - the ToolChangeListener being added to the toolChangeListeners list.

removeToolChangeListener

public void removeToolChangeListener(ToolChangeListener listener)

Adds the given listener to the the list to notify when the current tool has changed.

Parameters:

listener - the ToolChangeListener being removed from the toolChangeListeners list.

getCurrentCursor

public java.awt.Cursor getCurrentCursor()

Retrieves the cursor for the views based off of the currently selected tool.

setCurrentTool

public void setCurrentTool(int tool)

switches the toolbox to the given tool.

A-574
getCurrentTool

public int getCurrentTool()

Retrieves the enumerated type of the current tool.

Returns:

the Current tool.

getCurrentCursor

public java.awt.Cursor getCurrentCursor(java.awt.event.MouseEvent evt)

Retrieves the cursor for the views based off of the currently selected tool.

getComponentCategory

public Category getComponentCategory()

Retrieves the Category of the currently selected component type in the palette of the Toolbox.

Parameters:

model - the AbstractModel that the retrieved Category is for.

Returns:

the Category selected or null if none is selected.

isCompActionSelected

public boolean isCompActionSelected()

Returns true if the selected toolbox action will create an AbstractComponent. This method is needed to allow insert handlers to

determine if a complete() type method may be called from createSelected().

createSelected

public JComponent createSelected()

Creates an instance of the currently selected component type in the given model and returns a renderer for the created

component.

Returns:

the JComponent being used to render the created component.

Throws:

IllegalArgumentException - if the selected component type is not supported by the given model.

setCurrentAction

public void setCurrentAction(ToolboxAction action)

Sets the current ToolboxAction used for creating new drawings with the Insertion Tool. This method should only be called

from ToolboxAction derivatives.

A-575
createCursor

public static java.awt.Cursor createCursor(String resource)

Creates a Cursor from the image referred to by the given resource name.

Returns:

a java.awt.Cursor created with the given resource.

storeDisplayBean

public static byte[] storeDisplayBean(com.cafean.client.anim.AbstractDisplayBean bean)

XML Encodes the given bean and returns the byte[] result of the encoding.

createDisplayBeans

public JComponent[] createDisplayBeans(int pixelsPerMeter,

 AnimationBeanGenerator dc)

Attempts to create a set of AbstractDisplayBeans from the given AnimationBeanGenerator using

AnimationBeanGenerator.createDisplayBeans(int, double, java.lang.ClassLoader).

createDisplayBeans

public JComponent[] createDisplayBeans(int pixelsPerMeter,

 double widthScaleFactor,

 AnimationBeanGenerator dc)

Attempts to create a set of AbstractDisplayBeans from the given AnimationBeanGenerator using

AnimationBeanGenerator.createDisplayBeans(int, double, java.lang.ClassLoader).

loadVedaExport

public boolean loadVedaExport(java.io.File exportedFile)

Attempts to import a VEDA mask dump file. This is an experimental method that is only available during debug mode.

verifyBeansAvailable

public static boolean verifyBeansAvailable(Vector records)

Verifies that any com.cafean.client.anim.AbstractDisplayBeans stored in the given Vector as

com.cafean.client.io.med.DrawnDisplayBeanRecs have the proper classes available to be loaded.

Returns:

true if the display beans in the given Vector can be loaded

loadDisplayBean

public static com.cafean.client.anim.AbstractDisplayBean

loadDisplayBean(DrawnDisplayBeanRec rec)

Loads a display bean from the given display bean rec.

A-576
findDisplayBeanClass

public static Class findDisplayBeanClass(String className)

Retrieves the Class with the given class name in the list of Display Bean classes available.

Returns:

the Class referred to by className or null.

loadDisplayBeanClasses

public static void loadDisplayBeanClasses()

Loads the display beans from the jar files included in the Components directories in both the current user's home directory and

system wide.

A-577
com.cafean.client.ui

Class UndoableConnect

java.lang.Object

 |

 +-javax.swing.undo.AbstractUndoableEdit

 |

 +-com.cafean.client.ui.AbstractConnectionUndo

 |

 +-com.cafean.client.ui.UndoableConnect

public class UndoableConnect

extends AbstractConnectionUndo

This class is an undoable connect

All Implemented Interfaces:

java.io.Serializable, UndoableEdit

Constructor Summary

public UndoableConnect(AbstractComponent left, AbstractComponent right)

creates a new undoable connection to allow the connection of the given left component to the

given right component to be undone.

Method Summary

String getPresentationName()

void redo()

void undo()

Methods inherited from class com.cafean.client.ui.AbstractConnectionUndo

canRedo, canUndo, end, setConnection

Methods inherited from class javax.swing.undo.AbstractUndoableEdit

addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName,

getUndoPresentationName, isSignificant, redo, replaceEdit, toString, undo

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface javax.swing.undo.UndoableEdit

addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName,

getUndoPresentationName, isSignificant, redo, replaceEdit, undo

A-578
Constructors

UndoableConnect

public UndoableConnect(AbstractComponent left,

 AbstractComponent right)

creates a new undoable connection to allow the connection of the given left component to the given right component to be

undone. This object should be created before the connection is established and setConnection called afterward.

Methods

undo

public void undo()

 throws CannotUndoException

redo

public void redo()

 throws CannotRedoException

getPresentationName

public String getPresentationName()

A-579
com.cafean.client.ui

Class UndoableDelete

java.lang.Object

 |

 +-javax.swing.undo.AbstractUndoableEdit

 |

 +-com.cafean.client.ui.UndoableDelete

public class UndoableDelete

extends AbstractUndoableEdit

This class is an UndoableAction which deletes components.

All Implemented Interfaces:

java.io.Serializable, UndoableEdit

Constructor Summary

public UndoableDelete(Vector deleted)

Creates an undoable object for use in undoing the deletion of the givne components.

public UndoableDelete(AbstractComponent[] deleted)

Creates an undoable object for use in undoing the deletion of the givne components.

Method Summary

boolean canRedo()

returns true

boolean canUndo()

returns true

String getPresentationName()

void redo()

Redoes the deletion of this object's components by deleting them again

void undo()

Undoes the deletion of this object's components by reinserting them into the model.

Methods inherited from class javax.swing.undo.AbstractUndoableEdit

addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName,

getUndoPresentationName, isSignificant, redo, replaceEdit, toString, undo

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface javax.swing.undo.UndoableEdit

A-580
addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName,

getUndoPresentationName, isSignificant, redo, replaceEdit, undo

Constructors

UndoableDelete

public UndoableDelete(Vector deleted)

Creates an undoable object for use in undoing the deletion of the givne components.

Parameters:

components - a Vector of AbstractComponent objects to be deleted.

UndoableDelete

public UndoableDelete(AbstractComponent[] deleted)

Creates an undoable object for use in undoing the deletion of the givne components.

Parameters:

components - an AbstractComponent[] of components to be deleted.

Methods

canRedo

public boolean canRedo()

returns true

canUndo

public boolean canUndo()

returns true

undo

public void undo()

 throws CannotUndoException

Undoes the deletion of this object's components by reinserting them into the model.

redo

public void redo()

 throws CannotRedoException

Redoes the deletion of this object's components by deleting them again

A-581
getPresentationName

public String getPresentationName()

A-582
com.cafean.client.ui

Class UndoableDisconnect

java.lang.Object

 |

 +-javax.swing.undo.AbstractUndoableEdit

 |

 +-com.cafean.client.ui.AbstractConnectionUndo

 |

 +-com.cafean.client.ui.UndoableDisconnect

public class UndoableDisconnect

extends AbstractConnectionUndo

This class is an undoable disconnect

All Implemented Interfaces:

java.io.Serializable, UndoableEdit

Constructor Summary

public UndoableDisconnect(AbstractComponent left, AbstractComponent right)

creates a new undoable connection to allow the disconnection of the given left component to

the given right component to be undone.

Method Summary

String getPresentationName()

returns "Disconnect"

void redo()

Redoes this disconnection by disconnecting

void setConnection(Connection connection)

void undo()

Undoes this disconnection by re-establishing the conneciton

Methods inherited from class com.cafean.client.ui.AbstractConnectionUndo

canRedo, canUndo, end, setConnection

Methods inherited from class javax.swing.undo.AbstractUndoableEdit

addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName,

getUndoPresentationName, isSignificant, redo, replaceEdit, toString, undo

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

A-583
Methods inherited from interface javax.swing.undo.UndoableEdit

addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName,

getUndoPresentationName, isSignificant, redo, replaceEdit, undo

Constructors

UndoableDisconnect

public UndoableDisconnect(AbstractComponent left,

 AbstractComponent right)

creates a new undoable connection to allow the disconnection of the given left component to the given right component to be

undone. This object should be created before the connection disconnected and setConnection called afterward.

Methods

setConnection

public void setConnection(Connection connection)

undo

public void undo()

 throws CannotUndoException

Undoes this disconnection by re-establishing the conneciton

redo

public void redo()

 throws CannotRedoException

Redoes this disconnection by disconnecting

getPresentationName

public String getPresentationName()

returns "Disconnect"

A-584
com.cafean.client.ui

Class UndoableInsert

java.lang.Object

 |

 +-javax.swing.undo.AbstractUndoableEdit

 |

 +-com.cafean.client.ui.UndoableInsert

public class UndoableInsert

extends AbstractUndoableEdit

A simple UndoableEdit for use in undo-redo of a component insertion.

All Implemented Interfaces:

java.io.Serializable, UndoableEdit

Constructor Summary

public UndoableInsert(AbstractComponent component)

Creates a new undo object for use in undoing the insert of the given component.

Method Summary

boolean canRedo()

Returns true

boolean canUndo()

Returns true

String getPresentationName()

returns "Insert Component"

void redo()

redoes the insertion of the component by re-inserting it

void undo()

Undoes the insertion of the component by deleting it

Methods inherited from class javax.swing.undo.AbstractUndoableEdit

addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName,

getUndoPresentationName, isSignificant, redo, replaceEdit, toString, undo

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface javax.swing.undo.UndoableEdit

A-585
addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName,

getUndoPresentationName, isSignificant, redo, replaceEdit, undo

Constructors

UndoableInsert

public UndoableInsert(AbstractComponent component)

Creates a new undo object for use in undoing the insert of the given component.

Methods

canRedo

public boolean canRedo()

Returns true

canUndo

public boolean canUndo()

Returns true

undo

public void undo()

 throws CannotUndoException

Undoes the insertion of the component by deleting it

redo

public void redo()

 throws CannotRedoException

redoes the insertion of the component by re-inserting it

getPresentationName

public String getPresentationName()

returns "Insert Component"

A-586
com.cafean.client.ui

Class ZoomablePanel

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JPanel

 |

 +-com.cafean.client.ui.ZoomablePanel

public class ZoomablePanel

extends JPanel

implements javax.accessibility.Accessible, java.io.Serializable, HasGetTransferHandler,

java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, ToolChangeListener

The Zoomable panel is the panel in the DrawnView that contains both the BeanBox for components, and the GlassPane that covers the

view. It controls the MouseHandlers based on the ToolDialog's currently selected tool, and handles zooming the view based off of a

scaleFactor.

All Implemented Interfaces:

ToolChangeListener, java.io.Serializable, java.awt.MenuContainer, java.awt.image.ImageObserver,

HasGetTransferHandler, java.io.Serializable, javax.accessibility.Accessible

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Constructor Summary

public ZoomablePanel(AbstractModel model)

Constructs a new Zoomable Panel in a DrawnView.

Method Summary

AbstractButton addMouseHandler(MouseHandler handler)

Adds the given handler to the list of zoomable panel handlers and Toolbox handlers.

A-587
void addNotify()

Initializes this panel in response to its addition to another component.

BeanBox getBeanBox()

The BeanBox contains all the components that are visible inside the DrawnView.

DrawnView getDrawnView()

Each Zoomable Panel appears inside a scroll panel in a DrawnView.

GlassPanel getGlassPane()

Access routine for the glass pane.

java.awt.Dimension getMaximumSize()

Return the maximum size of this component.

java.awt.Dimension getMinimumSize()

Return the minimum size of this component.

MouseHandler getMouseHandler()

Gets the currently active MouseHandler based on the current tool.

java.awt.Dimension getPanelSize()

The PanelSize is the size of the canvas below this zoomable panel.

java.awt.Dimension getPreferredSize()

Return the preferred size of this component.

double getScale()

The scale factor is the factor by which the current view is multiplied when zooming in or out.

JScrollPane getScrollPane()

Each Zoomable Panel appears inside a scroll panel in a DrawnView.

ViewComponent getViewComponent()

Retrieves the ViewComponent that corresponds with the DrawnView that contains this

BeanBox.

java.awt.Point getViewportCenter()

Calculates the center of the currently visible position of the scrollpane containing this

ZoomablePanel.

java.awt.Dimension getZoomSize()

Return the size of scaled components.

java.awt.Point inverseTransformPoint(java.awt.Point p1)

The reverse transform of a point backwards throught the scaling factor.

void paintChildren(java.awt.Graphics g)

void refresh()

Forces a repaint of all children.

void refreshCompBounds(java.awt.Rectangle componentBounds)

Repaints the given component-space bounds.

A-588
void removeMouseHandler(MouseHandler handler)

Removes the given handler from the list of zoomable panel handlers and Toolbox handlers.

void revalidate()

void setBackground(java.awt.Color bg)

void setPanelSize(java.awt.Dimension size)

Sets the size of the canvas in the view.

void setScale(double scale)

Set the scaling factor property.

void setViewCenter(java.awt.Point center)

This sets the viewports center to the given Point.

void toolChanged(int oldTool, int newTool)

Responds to a notification from the Toolbox that the current tool has changed from oldTool

to newTool by activating the new MouseHandler, deactivating the old MouseHandler, and

updating the cursor.

java.awt.Point transformPoint(java.awt.Point p1)

Translate the coordinates of a point to account for the scaling factor.

void zoomToFit(java.awt.Rectangle rect)

This zooms the current view to fit the given rectangle.

Methods inherited from class javax.swing.JPanel

getAccessibleContext, getUI, getUIClassID, setUI, updateUI

Methods inherited from class javax.swing.JComponent

A-589
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-590
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-591
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface com.cafean.client.ui.tools.ToolChangeListener

toolChanged

Constructors

ZoomablePanel

public ZoomablePanel(AbstractModel model)

Constructs a new Zoomable Panel in a DrawnView.

Parameters:

model - the AbstractModel that contains the View that owns this panel.

Methods

paintChildren

public void paintChildren(java.awt.Graphics g)

setBackground

public void setBackground(java.awt.Color bg)

addNotify

public void addNotify()

Initializes this panel in response to its addition to another component.

getViewComponent

public ViewComponent getViewComponent()

Retrieves the ViewComponent that corresponds with the DrawnView that contains this BeanBox.

getBeanBox

public BeanBox getBeanBox()

A-592
The BeanBox contains all the components that are visible inside the DrawnView. All routines that manipulate those

components, or detail what components appear in the view are ultimately controlled through the BeanBox.

Returns:

the BeanBox that contains all the components inside this zoomable panel.

getGlassPane

public GlassPanel getGlassPane()

Access routine for the glass pane.

Returns:

the GlassPanel that covers this zoomable panel.

getViewportCenter

public java.awt.Point getViewportCenter()

Calculates the center of the currently visible position of the scrollpane containing this ZoomablePanel.

Returns:

a Point containing the scaled viewport center coordinates.

toolChanged

public void toolChanged(int oldTool,

 int newTool)

Responds to a notification from the Toolbox that the current tool has changed from oldTool to newTool by activating the

new MouseHandler, deactivating the old MouseHandler, and updating the cursor.

Tools are one of the TOOL_* enumerations in Toolbox.

Parameters:

oldTool - the int type of the old tool.

newTool - the int type of the new tool.

See Also:

Toolbox.getCurrentTool()

getMouseHandler

public MouseHandler getMouseHandler()

Gets the currently active MouseHandler based on the current tool.

Returns:

the MouseHandeler used by the current tool.

addMouseHandler

public AbstractButton addMouseHandler(MouseHandler handler)

A-593
Adds the given handler to the list of zoomable panel handlers and Toolbox handlers. This also assigns a proper handler ID to

the given handler. Note that this method also creates a toolbar button for the handler and adds the button to the same toolbar as

the select and pan tools. The created button is then returned. To move this button to a different toolbar simply remove the

button from its parent with button.getParent().remove(button).

Parameters:

handler - the MouseHandler to add and assign an ID to.

Returns:

the AbstractButton created for the new handler in the toobox.

Throws:

IllegalArgumentException - if the given mouse handler has a handler ID that is already in use.

removeMouseHandler

public void removeMouseHandler(MouseHandler handler)

Removes the given handler from the list of zoomable panel handlers and Toolbox handlers.

Parameters:

handler - the MouseHandler to remove

setPanelSize

public void setPanelSize(java.awt.Dimension size)

Sets the size of the canvas in the view.

Parameters:

size - the Dimension that will be the size of the canvas.

revalidate

public void revalidate()

refresh

public void refresh()

Forces a repaint of all children.

refreshCompBounds

public void refreshCompBounds(java.awt.Rectangle componentBounds)

Repaints the given component-space bounds. The given bounds are scaled appropriately for this panel's scale factor.

WARNING: the given rectangle will be modified

getPanelSize

public java.awt.Dimension getPanelSize()

A-594
The PanelSize is the size of the canvas below this zoomable panel. This defines the size of the white canvas inside a view.

Returns:

the Dimension of the panel.

getZoomSize

public java.awt.Dimension getZoomSize()

Return the size of scaled components. This is the panel size scaled by the current scale factor.

Returns:

A dimension object indicating this component's prefered size.

getPreferredSize

public java.awt.Dimension getPreferredSize()

Return the preferred size of this component. This is the panel size scaled by the current scale factor.

Returns:

A dimension object indicating this component's prefered size.

getMaximumSize

public java.awt.Dimension getMaximumSize()

Return the maximum size of this component.

Returns:

A dimension object indicating this component's maximum size.

See Also:

getPreferredSize()

getMinimumSize

public java.awt.Dimension getMinimumSize()

Return the minimum size of this component.

Returns:

A dimension object indicating this component's minimum size.

See Also:

getPreferredSize()

setScale

public void setScale(double scale)

Set the scaling factor property.

Parameters:

A-595
scale - the new scaling factor.

getScale

public double getScale()

The scale factor is the factor by which the current view is multiplied when zooming in or out.

Returns:

the double that is the current scale factor.

inverseTransformPoint

public java.awt.Point inverseTransformPoint(java.awt.Point p1)

The reverse transform of a point backwards throught the scaling factor.

Parameters:

p1 - the Point to be inverse transformed by the scaling factor.

Returns:

A Point that represents p1 inverse transformed by the scaling factor.

transformPoint

public java.awt.Point transformPoint(java.awt.Point p1)

Translate the coordinates of a point to account for the scaling factor.

Parameters:

p1 - the Point to be transformed by the scaling factor.

Returns:

A Point that represents p1 transformed by the scaling factor.

getDrawnView

public DrawnView getDrawnView()

Each Zoomable Panel appears inside a scroll panel in a DrawnView. This accessor finds the closest ancestor of this panel that

is a DrawnView, and returns it.

Returns:

the DrawnView parent of this zoomable panel.

getScrollPane

public JScrollPane getScrollPane()

Each Zoomable Panel appears inside a scroll panel in a DrawnView. This accessor finds the closest ancestor of this panel that

is a JScrollPanel, and returns it.

Returns:

the JScrollPane parent of this zoomable panel.

A-596
setViewCenter

public void setViewCenter(java.awt.Point center)

This sets the viewports center to the given Point. This adds the setViewPosition to the event stack, which makes sure that all

other current events are finished before the view's position gets set. This is to ensure that during a Zoom operation the viewport

center gets set last.

Parameters:

center - the Point in current zoomed coordinates that should be the center.

zoomToFit

public void zoomToFit(java.awt.Rectangle rect)

This zooms the current view to fit the given rectangle. The viewport in the JScrollPane will be set to the center of the rectangle

after the view is zoomed.

Parameters:

rect - the Rectangle in current zoomed coordinates.

A-597
Package

com.cafean.client.ui.annotation

This package contains the ModelEditor provided Annotation elements for views. Documentation for these classes is provided to allow

for their use in generating Animation plug-in displays from plug-in specific DrawnComponent instances.

A-598
com.cafean.client.ui.annotation

Class Annotation

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JPanel

 |

 +-com.cafean.client.ui.annotation.Annotation

public abstract class Annotation

extends JPanel

implements javax.accessibility.Accessible, java.io.Serializable, HasGetTransferHandler,

java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, StateEditable,

java.io.Serializable, java.awt.event.MouseListener, Groupable, PropertyController

This Abstract class should be extended by any object that is used only to impart data to an analyst looking at a DrawnView.

All Implemented Interfaces:

PropertyController, Groupable, java.awt.event.MouseListener, java.io.Serializable, StateEditable, java.io.Serializable,

java.awt.MenuContainer, java.awt.image.ImageObserver, HasGetTransferHandler, java.io.Serializable,

javax.accessibility.Accessible

Direct Known Subclasses:

ImageAnnotation, TextAnnotation, LineAnnotation, RectangularAnnotation, EllipticalAnnotation

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Fields inherited from interface javax.swing.undo.StateEditable

RCSID

Fields inherited from interface com.cafean.client.ui.beans.PropertyController

ALL, COLOR_OPTIONAL, DISABLED, NONE, OPTIONAL, REQUIRED

A-599
Constructor Summary

public Annotation()

Creates a new instance of Annotation

Method Summary

void addPopupMenuItems(JPopupMenu menu, java.awt.event.MouseEvent evt)

int getAttributeIndex(String propertyName)

Returns a relative index that can be used to order property lists.

Border getBorder()

java.awt.Rectangle getBounds()

DrawnView getDrawnView()

Retrieves the DrawnView that contains this DrawnComponent or null if this DrawnComponent

exists outside of a DrawnView.

int getGroupID()

Retrieves the ID of this object's visual group.

int getHeight()

int getWidth()

boolean isGroupIDValid()

Returns true if this object's visual group ID is valid.

boolean isPropertyActive(String propertyName)

Returns false if this object has a property with the given name that is considered inactive;

otherwise true.

boolean isPropertyEnabled(String propertyName)

Returns false if this object has a property with the given name that has dependency code that

fails;true otherwise

boolean isPropertyRequired(String propertyName)

Returns false if this object has a property with the given name that has requirement code that

fails; true otherwise.

boolean isPropertyResizable(String propertyName)

Returns false if this object has an array property with the given name that should not normally

be resizable.

boolean isPropertyRestartEditable(String propertyName)

Returns true if this object has a property with the given name that should be editable during a

restart edit; false otherwise.

boolean isRestartResizable(String propertyName)

Returns false if this object has an array property with the given name that should not be

resizable while editing a restart.

A-600
void mouseClicked(java.awt.event.MouseEvent e)

void mouseEntered(java.awt.event.MouseEvent e)

void mouseExited(java.awt.event.MouseEvent e)

void mousePressed(java.awt.event.MouseEvent e)

void mouseReleased(java.awt.event.MouseEvent e)

void moveTo(double x, double y, boolean last)

Move the Annotation so the center is the specified position

abstract void popupEditor()

This is used for Annotations to generate their editing dialogs.

void print(java.awt.Graphics g)

void refresh(java.awt.Rectangle r)

This refreshses a given java.awt.Rectangle that indicates a dirty region.

void repaint()

Repaints this component by calling BeanBox.refresh(Rectangle).

abstract void resetSize()

This resets the current size of the annotation.

void restoreState(Hashtable state)

Restore the state of the bean from an earlier edit.

void setBorder(Border border)

void setBounds(java.awt.Rectangle bounds)

void setGroupID(int groupID)

Sets the ID of this object's visual group.

void setGroupIDValid(boolean valid)

Sets the flag that is used to determine if this object's visual group ID must be reconnected after

a paste operation.

void setHeight(int height)

void setWidth(int width)

DrawnAnnotationRec store()

void storeState(Hashtable state)

Store the state of the bean to permit undo.

A-601
String toString()

Methods inherited from class javax.swing.JPanel

getAccessibleContext, getUI, getUIClassID, setUI, updateUI

Methods inherited from class javax.swing.JComponent

addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-602
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-603
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface javax.swing.undo.StateEditable

restoreState, storeState

Methods inherited from interface java.awt.event.MouseListener

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased

Methods inherited from interface com.cafean.client.ui.util.Groupable

getGroupID, isGroupIDValid, setGroupID, setGroupIDValid

Methods inherited from interface com.cafean.client.ui.beans.PropertyController

getAttributeIndex, isPropertyActive, isPropertyEnabled, isPropertyRequired,

isPropertyResizable, isPropertyRestartEditable, isRestartResizable

Constructors

Annotation

public Annotation()

Creates a new instance of Annotation

Methods

print

public void print(java.awt.Graphics g)

getDrawnView

public DrawnView getDrawnView()

Retrieves the DrawnView that contains this DrawnComponent or null if this DrawnComponent exists outside of a DrawnView.

Returns:

the DrawnView at the top of the ancestor list.

A-604
getGroupID

public int getGroupID()

Retrieves the ID of this object's visual group.

setGroupID

public void setGroupID(int groupID)

Sets the ID of this object's visual group.

isGroupIDValid

public boolean isGroupIDValid()

Returns true if this object's visual group ID is valid. Valid visual group IDs are not reconnected during a paste operation.

setGroupIDValid

public void setGroupIDValid(boolean valid)

Sets the flag that is used to determine if this object's visual group ID must be reconnected after a paste operation.

getBorder

public Border getBorder()

setBorder

public void setBorder(Border border)

setHeight

public void setHeight(int height)

getHeight

public int getHeight()

getWidth

public int getWidth()

A-605
setWidth

public void setWidth(int width)

getBounds

public java.awt.Rectangle getBounds()

setBounds

public void setBounds(java.awt.Rectangle bounds)

store

public DrawnAnnotationRec store()

storeState

public void storeState(Hashtable state)

Store the state of the bean to permit undo. NOTE: If the component storing its state needs a deep copy that it's clone() method

does not provide, it must override storeState to find that functionality elsewhere.

Parameters:

state - A hash table containing modified parameters.

restoreState

public void restoreState(Hashtable state)

Restore the state of the bean from an earlier edit.

Parameters:

state - A hash table containing modified parameters.

popupEditor

public abstract void popupEditor()

This is used for Annotations to generate their editing dialogs. Since these are not components, they cannot use the Component

View editor. This should handle creating the undo object and saving the current state before implementing changes

A-606
moveTo

public void moveTo(double x,

 double y,

 boolean last)

Move the Annotation so the center is the specified position

Parameters:

x - the new center x position

y - the new center y position

last - false while moving, true on the final move

resetSize

public abstract void resetSize()

This resets the current size of the annotation. This ensures that all annotations do not lose any data when the scale changes.

addPopupMenuItems

public void addPopupMenuItems(JPopupMenu menu,

 java.awt.event.MouseEvent evt)

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)

A-607
refresh

public void refresh(java.awt.Rectangle r)

This refreshses a given java.awt.Rectangle that indicates a dirty region.

Parameters:

r - the Rectangle indicating the dirty region to be refreshed.

See Also:

repaint

toString

public String toString()

repaint

public void repaint()

Repaints this component by calling BeanBox.refresh(Rectangle).

isPropertyEnabled

public boolean isPropertyEnabled(String propertyName)

Returns false if this object has a property with the given name that has dependency code that fails;true otherwise

Parameters:

propertyName - a String containing the property name to check

isPropertyRequired

public boolean isPropertyRequired(String propertyName)

Returns false if this object has a property with the given name that has requirement code that fails; true otherwise.

Parameters:

propertyName - a String containing the property name to check

isPropertyRestartEditable

public boolean isPropertyRestartEditable(String propertyName)

Returns true if this object has a property with the given name that should be editable during a restart edit; false otherwise.

Parameters:

propertyName - a String containing the property name to check

A-608
isPropertyActive

public boolean isPropertyActive(String propertyName)

Returns false if this object has a property with the given name that is considered inactive; otherwise true.

A property's active state is separate from its enabled state to allow for a namelist-like property that is actually a boolean paired

with a property of another type.

Parameters:

propertyName - a String containing the name of the property to check

Returns:

false if the property is inactive, true otherwise

See Also:

NamelistEditor

getAttributeIndex

public int getAttributeIndex(String propertyName)

Returns a relative index that can be used to order property lists.

Parameters:

propertyName - a String containing the property name to check

isPropertyResizable

public boolean isPropertyResizable(String propertyName)

Returns false if this object has an array property with the given name that should not normally be resizable.

Parameters:

propertyName - a String containing the property name to check

isRestartResizable

public boolean isRestartResizable(String propertyName)

Returns false if this object has an array property with the given name that should not be resizable while editing a restart.

Parameters:

propertyName - a String containing the property name to check

A-609
com.cafean.client.ui.annotation

Class EllipticalAnnotation

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JPanel

 |

 +-com.cafean.client.ui.annotation.Annotation

 |

 +-com.cafean.client.ui.annotation.EllipticalAnnotation

public class EllipticalAnnotation

extends Annotation

implements StateEditable, java.io.Serializable, java.awt.event.MouseListener, Groupable,

PropertyController, javax.accessibility.Accessible, java.io.Serializable, HasGetTransferHandler,

java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, Insertable

A configurable drawn ellipse.

All Implemented Interfaces:

Insertable, java.io.Serializable, java.awt.MenuContainer, java.awt.image.ImageObserver, HasGetTransferHandler,

java.io.Serializable, javax.accessibility.Accessible, PropertyController, Groupable, java.awt.event.MouseListener,

java.io.Serializable, StateEditable

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Fields inherited from interface javax.swing.undo.StateEditable

RCSID

Fields inherited from interface com.cafean.client.ui.beans.PropertyController

ALL, COLOR_OPTIONAL, DISABLED, NONE, OPTIONAL, REQUIRED

Constructor Summary

A-610
public EllipticalAnnotation()

Creates a new instance of RectangularAnnotation

Method Summary

java.awt.Color getBackground()

java.awt.Color getForeground()

int getLineThickness()

Getter for property lineThickness.

AbstractInsertHandler getNewInsertHandler(ZoomablePanel parent)

boolean isFilled()

void paintComponent(java.awt.Graphics g)

void popupEditor()

This is used for Annotations to generate their editing dialogs. Since these are not components,

they cannot use the Component View editor. This should handle creating the undo object and

saving the current state before implementing changes

void resetSize()

This resets the current size of the annotation. This ensures that all annotations do not lose any

data when the scale changes.

void restoreState(Hashtable state)

Restore the state of the bean from an earlier edit.

void setBackground(java.awt.Color bg)

void setEqualTo(EllipticalAnnotation annotation)

Sets this annotation equal to the given annotation

void setFilled(boolean filled)

void setForeground(java.awt.Color fg)

void setLineThickness(int lineThickness)

Setter for property lineThickness.

void setOpaque(boolean filled)

void storeState(Hashtable state)

Methods inherited from class com.cafean.client.ui.annotation.Annotation

A-611
addPopupMenuItems, getAttributeIndex, getBorder, getBounds, getDrawnView, getGroupID,

getHeight, getWidth, isGroupIDValid, isPropertyActive, isPropertyEnabled,

isPropertyRequired, isPropertyResizable, isPropertyRestartEditable, isRestartResizable,

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, moveTo,

popupEditor, print, refresh, repaint, resetSize, restoreState, setBorder, setBounds,

setGroupID, setGroupIDValid, setHeight, setWidth, store, storeState, toString

Methods inherited from class javax.swing.JPanel

getAccessibleContext, getUI, getUIClassID, setUI, updateUI

Methods inherited from class javax.swing.JComponent

addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

A-612
add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-613
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-614
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface javax.swing.undo.StateEditable

restoreState, storeState

Methods inherited from interface java.awt.event.MouseListener

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased

Methods inherited from interface com.cafean.client.ui.util.Groupable

getGroupID, isGroupIDValid, setGroupID, setGroupIDValid

Methods inherited from interface com.cafean.client.ui.beans.PropertyController

getAttributeIndex, isPropertyActive, isPropertyEnabled, isPropertyRequired,

isPropertyResizable, isPropertyRestartEditable, isRestartResizable

Methods inherited from interface com.cafean.client.ui.tools.insert.Insertable

getNewInsertHandler

Constructors

EllipticalAnnotation

public EllipticalAnnotation()

Creates a new instance of RectangularAnnotation

Methods

setOpaque

public void setOpaque(boolean filled)

setFilled

public void setFilled(boolean filled)

A-615
isFilled

public boolean isFilled()

paintComponent

public void paintComponent(java.awt.Graphics g)

getForeground

public java.awt.Color getForeground()

getBackground

public java.awt.Color getBackground()

setForeground

public void setForeground(java.awt.Color fg)

setBackground

public void setBackground(java.awt.Color bg)

popupEditor

public void popupEditor()

This is used for Annotations to generate their editing dialogs. Since these are not components, they cannot use the Component

View editor. This should handle creating the undo object and saving the current state before implementing changes

setEqualTo

public void setEqualTo(EllipticalAnnotation annotation)

Sets this annotation equal to the given annotation

storeState

public void storeState(Hashtable state)

A-616
Store the state of the bean to permit undo. NOTE: If the component storing its state needs a deep copy that it's clone() method

does not provide, it must override storeState to find that functionality elsewhere.

restoreState

public void restoreState(Hashtable state)

Restore the state of the bean from an earlier edit.

Parameters:

state - A hash table containing modified parameters.

resetSize

public void resetSize()

This resets the current size of the annotation. This ensures that all annotations do not lose any data when the scale changes.

getLineThickness

public int getLineThickness()

Getter for property lineThickness.

Returns:

Value of property lineThickness.

setLineThickness

public void setLineThickness(int lineThickness)

Setter for property lineThickness.

Parameters:

lineThickness - New value of property lineThickness.

getNewInsertHandler

public AbstractInsertHandler getNewInsertHandler(ZoomablePanel parent)

A-617
com.cafean.client.ui.annotation

Class ImageAnnotation

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JPanel

 |

 +-com.cafean.client.ui.annotation.Annotation

 |

 +-com.cafean.client.ui.annotation.ImageAnnotation

public class ImageAnnotation

extends Annotation

implements StateEditable, java.io.Serializable, java.awt.event.MouseListener, Groupable,

PropertyController, javax.accessibility.Accessible, java.io.Serializable, HasGetTransferHandler,

java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable,

java.awt.event.ComponentListener

All Implemented Interfaces:

java.awt.event.ComponentListener, java.io.Serializable, java.awt.MenuContainer, java.awt.image.ImageObserver,

HasGetTransferHandler, java.io.Serializable, javax.accessibility.Accessible, PropertyController, Groupable,

java.awt.event.MouseListener, java.io.Serializable, StateEditable

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Fields inherited from interface javax.swing.undo.StateEditable

RCSID

Fields inherited from interface com.cafean.client.ui.beans.PropertyController

ALL, COLOR_OPTIONAL, DISABLED, NONE, OPTIONAL, REQUIRED

Constructor Summary

A-618
public ImageAnnotation()

Creates a new instance of DrawnComponentView

Method Summary

void addPopupMenuItems(JPopupMenu menu, java.awt.event.MouseEvent evt)

void componentHidden(java.awt.event.ComponentEvent e)

void componentMoved(java.awt.event.ComponentEvent e)

void componentResized(java.awt.event.ComponentEvent e)

void componentShown(java.awt.event.ComponentEvent e)

DrawnImageAnnotationR

ec

createPibBlock()

byte[] getImageData()

Retrieves this annotation's image data.

java.awt.Dimension getMinimumSize()

void paintComponent(java.awt.Graphics g)

Draw a simple X'd box if there is no image.

void popupEditor()

void reset()

Creates a draw view component and puts it in the drawing vectors.

void resetSize()

void restoreState(Hashtable state)

Restore the state of the bean from an earlier edit.

void setImageData(byte[] imageData)

Sets this annotation's image data and resizes to the size of the image in imageData.

void setImageData(byte[] imageData, boolean resize)

Sets this annotation's image data and optionally resizes to the size of the image in imageData.

void storeState(Hashtable state)

Store the state of the bean to permit undo.

Methods inherited from class com.cafean.client.ui.annotation.Annotation

A-619
addPopupMenuItems, getAttributeIndex, getBorder, getBounds, getDrawnView, getGroupID,

getHeight, getWidth, isGroupIDValid, isPropertyActive, isPropertyEnabled,

isPropertyRequired, isPropertyResizable, isPropertyRestartEditable, isRestartResizable,

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, moveTo,

popupEditor, print, refresh, repaint, resetSize, restoreState, setBorder, setBounds,

setGroupID, setGroupIDValid, setHeight, setWidth, store, storeState, toString

Methods inherited from class javax.swing.JPanel

getAccessibleContext, getUI, getUIClassID, setUI, updateUI

Methods inherited from class javax.swing.JComponent

addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

A-620
add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-621
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-622
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface javax.swing.undo.StateEditable

restoreState, storeState

Methods inherited from interface java.awt.event.MouseListener

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased

Methods inherited from interface com.cafean.client.ui.util.Groupable

getGroupID, isGroupIDValid, setGroupID, setGroupIDValid

Methods inherited from interface com.cafean.client.ui.beans.PropertyController

getAttributeIndex, isPropertyActive, isPropertyEnabled, isPropertyRequired,

isPropertyResizable, isPropertyRestartEditable, isRestartResizable

Methods inherited from interface java.awt.event.ComponentListener

componentHidden, componentMoved, componentResized, componentShown

Constructors

ImageAnnotation

public ImageAnnotation()

Creates a new instance of DrawnComponentView

Methods

addPopupMenuItems

public void addPopupMenuItems(JPopupMenu menu,

 java.awt.event.MouseEvent evt)

getMinimumSize

public java.awt.Dimension getMinimumSize()

A-623
reset

public void reset()

Creates a draw view component and puts it in the drawing vectors.

paintComponent

public void paintComponent(java.awt.Graphics g)

Draw a simple X'd box if there is no image.

componentResized

public void componentResized(java.awt.event.ComponentEvent e)

componentHidden

public void componentHidden(java.awt.event.ComponentEvent e)

componentMoved

public void componentMoved(java.awt.event.ComponentEvent e)

componentShown

public void componentShown(java.awt.event.ComponentEvent e)

popupEditor

public void popupEditor()

This is used for Annotations to generate their editing dialogs. Since these are not components, they cannot use the Component

View editor. This should handle creating the undo object and saving the current state before implementing changes

resetSize

public void resetSize()

This resets the current size of the annotation. This ensures that all annotations do not lose any data when the scale changes.

storeState

public void storeState(Hashtable state)

Store the state of the bean to permit undo.

A-624
Parameters:

state - A hash table containing modified parameters.

restoreState

public void restoreState(Hashtable state)

Restore the state of the bean from an earlier edit.

Parameters:

state - A hash table containing modified parameters.

createPibBlock

public DrawnImageAnnotationRec createPibBlock()

setImageData

public void setImageData(byte[] imageData)

Sets this annotation's image data and resizes to the size of the image in imageData.

See Also:

setImageData(byte[], boolean)

setImageData

public void setImageData(byte[] imageData,

 boolean resize)

Sets this annotation's image data and optionally resizes to the size of the image in imageData.

Parameters:

imageData - a byte[] containing a Java-Readable image in appropriate for loading with new ImageIcon(imageData);

resize - if true this annotation will adjust its size to that of the given image.

getImageData

public byte[] getImageData()

Retrieves this annotation's image data. Image data is the byte[] data read from file to create this annotation's image.

A-625
com.cafean.client.ui.annotation

Class LineAnnotation

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JPanel

 |

 +-com.cafean.client.ui.annotation.Annotation

 |

 +-com.cafean.client.ui.annotation.LineAnnotation

public class LineAnnotation

extends Annotation

implements StateEditable, java.io.Serializable, java.awt.event.MouseListener, Groupable,

PropertyController, javax.accessibility.Accessible, java.io.Serializable, HasGetTransferHandler,

java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable,

java.awt.event.MouseMotionListener, FullScreenDrawing, Insertable

A configurable drawn line.

All Implemented Interfaces:

Insertable, FullScreenDrawing, java.awt.event.MouseMotionListener, java.io.Serializable, java.awt.MenuContainer,

java.awt.image.ImageObserver, HasGetTransferHandler, java.io.Serializable, javax.accessibility.Accessible,

PropertyController, Groupable, java.awt.event.MouseListener, java.io.Serializable, StateEditable

Field Summary

public static final ARROW_FILLED

Value: 1

public static final ARROW_HOLLOW

Value: 2

public static final ARROW_LINE

Value: 4

public static final ARROW_NAMES

public static final ARROW_NONE

Value: 0

public static final ARROW_TYPES

Fields inherited from class javax.swing.JComponent

A-626
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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Fields inherited from interface javax.swing.undo.StateEditable

RCSID

Fields inherited from interface com.cafean.client.ui.beans.PropertyController

ALL, COLOR_OPTIONAL, DISABLED, NONE, OPTIONAL, REQUIRED

Constructor Summary

public LineAnnotation()

Creates a new instance of LineAnnotation

Method Summary

boolean addPoint(java.awt.Point p)

Adds a path point at the given point, if the point falls on an existing line segment.

void addPopupMenuItems(JPopupMenu menu, java.awt.event.MouseEvent evt)

boolean canAddPoint(java.awt.Point p)

Return true if a point can be added to the path.

boolean canRemovePoint(java.awt.Point p)

Return true if a point can be removed from the path.

boolean contains(double x, double y)

boolean contains(int x, int y)

boolean contains(java.awt.Point p)

int[] getArrows()

Getter for property arrows.

float getArrowSize()

Getter for property arrowSize.

static String getArrowTypeName(int type)

A-627
int getHead1()

int getHead2()

int getLineThickness()

Getter for property lineThickness.

AbstractInsertHandler getNewInsertHandler(ZoomablePanel parent)

java.awt.Point[] getPath()

Retrieves a copy of the plotted path points that this DrawnConnection is painting.

java.awt.Rectangle getUsedBounds()

boolean isDashed()

Getter for property dashed.

boolean isObjectInsideBounds(java.awt.geom.Rectangle2D.Double rect)

void mouseClicked(java.awt.event.MouseEvent e)

void mouseDragged(java.awt.event.MouseEvent e)

Handle mouseDragged events for segment and point manipulation

void mouseEntered(java.awt.event.MouseEvent e)

void mouseExited(java.awt.event.MouseEvent e)

void mouseMoved(java.awt.event.MouseEvent e)

void mousePressed(java.awt.event.MouseEvent e)

Handle mousePressed events to support segment and point manipulation

void mouseReleased(java.awt.event.MouseEvent e)

Handle mouseReleased events to support segment and point manipulation

void moveTo(double x, double y, boolean last)

Move the Annotation so the center is the specified position

void paintComponent(java.awt.Graphics g)

void popupEditor()

void removeClosestPoint(java.awt.Point p)

Attempts to remove the closest point in this DrawnConnection's set of points.

boolean removePoint(java.awt.Point p)

Attempts to remove the path point at the given location.

A-628
void repaint()

void resetSize()

void restoreState(Hashtable state)

Restore the state of the bean from an earlier edit.

void revalidate()

void setArrows(int[] arrows)

Setter for property arrows.

void setArrowSize(float arrowSize)

Setter for property arrowSize.

void setDashed(boolean dashed)

Setter for property dashed.

void setEqualTo(LineAnnotation annotation)

Sets this annotation equal to the given annotation

void setHead1(int head1)

void setHead2(int head2)

void setLineThickness(int lineThickness)

Setter for property lineThickness.

void setPath(java.awt.Point[] path)

Sets the path points that this DrawnConnection will use for connecting.

void storeState(Hashtable state)

Store the state of the bean to permit undo.

void translate(int dx, int dy)

void validate()

Methods inherited from class com.cafean.client.ui.annotation.Annotation

addPopupMenuItems, getAttributeIndex, getBorder, getBounds, getDrawnView, getGroupID,

getHeight, getWidth, isGroupIDValid, isPropertyActive, isPropertyEnabled,

isPropertyRequired, isPropertyResizable, isPropertyRestartEditable, isRestartResizable,

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, moveTo,

popupEditor, print, refresh, repaint, resetSize, restoreState, setBorder, setBounds,

setGroupID, setGroupIDValid, setHeight, setWidth, store, storeState, toString

Methods inherited from class javax.swing.JPanel

getAccessibleContext, getUI, getUIClassID, setUI, updateUI

A-629
Methods inherited from class javax.swing.JComponent

addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-630
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-631
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface javax.swing.undo.StateEditable

restoreState, storeState

Methods inherited from interface java.awt.event.MouseListener

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased

Methods inherited from interface com.cafean.client.ui.util.Groupable

getGroupID, isGroupIDValid, setGroupID, setGroupIDValid

Methods inherited from interface com.cafean.client.ui.beans.PropertyController

getAttributeIndex, isPropertyActive, isPropertyEnabled, isPropertyRequired,

isPropertyResizable, isPropertyRestartEditable, isRestartResizable

Methods inherited from interface java.awt.event.MouseMotionListener

mouseDragged, mouseMoved

Methods inherited from interface com.cafean.client.ui.FullScreenDrawing

getUsedBounds, translate

Methods inherited from interface com.cafean.client.ui.tools.insert.Insertable

getNewInsertHandler

Fields

ARROW_NONE

public static final int ARROW_NONE

Constant value: 0

ARROW_FILLED

public static final int ARROW_FILLED

Constant value: 1

A-632
ARROW_HOLLOW

public static final int ARROW_HOLLOW

Constant value: 2

ARROW_LINE

public static final int ARROW_LINE

Constant value: 4

ARROW_NAMES

public static final java.lang.String ARROW_NAMES

ARROW_TYPES

public static final int ARROW_TYPES

Constructors

LineAnnotation

public LineAnnotation()

Creates a new instance of LineAnnotation

Methods

getArrowTypeName

public static String getArrowTypeName(int type)

paintComponent

public void paintComponent(java.awt.Graphics g)

moveTo

public void moveTo(double x,

 double y,

 boolean last)

A-633
Move the Annotation so the center is the specified position

Parameters:

x - the new center x position

y - the new center y position

last - false while moving, true on the final move

contains

public boolean contains(double x,

 double y)

contains

public boolean contains(java.awt.Point p)

contains

public boolean contains(int x,

 int y)

getPath

public java.awt.Point[] getPath()

Retrieves a copy of the plotted path points that this DrawnConnection is painting.

Returns:

a Point[] containing the coordinates of each point.

setPath

public void setPath(java.awt.Point[] path)

Sets the path points that this DrawnConnection will use for connecting.

popupEditor

public void popupEditor()

This is used for Annotations to generate their editing dialogs. Since these are not components, they cannot use the Component

View editor. This should handle creating the undo object and saving the current state before implementing changes

setEqualTo

public void setEqualTo(LineAnnotation annotation)

Sets this annotation equal to the given annotation

A-634
mousePressed

public void mousePressed(java.awt.event.MouseEvent e)

Handle mousePressed events to support segment and point manipulation

See Also:

mouseReleased(MouseEvent)

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)

removeClosestPoint

public void removeClosestPoint(java.awt.Point p)

Attempts to remove the closest point in this DrawnConnection's set of points.

Parameters:

p - the Point to remove the closest path point.

removePoint

public boolean removePoint(java.awt.Point p)

Attempts to remove the path point at the given location.

Parameters:

p - the Point at which to delete a path point.

Returns:

true if the point was deleted.

canRemovePoint

public boolean canRemovePoint(java.awt.Point p)

Return true if a point can be removed from the path.

canAddPoint

public boolean canAddPoint(java.awt.Point p)

Return true if a point can be added to the path.

addPoint

public boolean addPoint(java.awt.Point p)

Adds a path point at the given point, if the point falls on an existing line segment.

A-635
Parameters:

p - the Point at which to add a path point.

Returns:

true if the point is actually added.

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)

Handle mouseReleased events to support segment and point manipulation

See Also:

mousePressed(MouseEvent)

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)

Handle mouseDragged events for segment and point manipulation

See Also:

mousePressed(MouseEvent)

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)

isObjectInsideBounds

public boolean isObjectInsideBounds(java.awt.geom.Rectangle2D.Double rect)

repaint

public void repaint()

Repaints this component by calling BeanBox.refresh(Rectangle).

A-636
translate

public void translate(int dx,

 int dy)

getUsedBounds

public java.awt.Rectangle getUsedBounds()

resetSize

public void resetSize()

This resets the current size of the annotation. This ensures that all annotations do not lose any data when the scale changes.

getLineThickness

public int getLineThickness()

Getter for property lineThickness.

Returns:

Value of property lineThickness.

setLineThickness

public void setLineThickness(int lineThickness)

Setter for property lineThickness.

Parameters:

lineThickness - New value of property lineThickness.

addPopupMenuItems

public void addPopupMenuItems(JPopupMenu menu,

 java.awt.event.MouseEvent evt)

revalidate

public void revalidate()

validate

public void validate()

A-637
storeState

public void storeState(Hashtable state)

Store the state of the bean to permit undo.

Parameters:

state - A hash table containing modified parameters.

restoreState

public void restoreState(Hashtable state)

Restore the state of the bean from an earlier edit.

Parameters:

state - A hash table containing modified parameters.

getArrows

public int[] getArrows()

Getter for property arrows.

Returns:

Value of property arrows.

setArrows

public void setArrows(int[] arrows)

Setter for property arrows.

Parameters:

arrows - New value of property arrows.

getArrowSize

public float getArrowSize()

Getter for property arrowSize.

Returns:

Value of property arrowSize.

setArrowSize

public void setArrowSize(float arrowSize)

Setter for property arrowSize.

Parameters:

A-638
arrowSize - New value of property arrowSize.

isDashed

public boolean isDashed()

Getter for property dashed.

Returns:

Value of property dashed.

setDashed

public void setDashed(boolean dashed)

Setter for property dashed.

Parameters:

dashed - New value of property dashed.

getHead1

public int getHead1()

setHead1

public void setHead1(int head1)

getHead2

public int getHead2()

setHead2

public void setHead2(int head2)

getNewInsertHandler

public AbstractInsertHandler getNewInsertHandler(ZoomablePanel parent)

A-639
com.cafean.client.ui.annotation

Class RectangularAnnotation

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JPanel

 |

 +-com.cafean.client.ui.annotation.Annotation

 |

 +-com.cafean.client.ui.annotation.RectangularAnnotation

public class RectangularAnnotation

extends Annotation

implements StateEditable, java.io.Serializable, java.awt.event.MouseListener, Groupable,

PropertyController, javax.accessibility.Accessible, java.io.Serializable, HasGetTransferHandler,

java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, Insertable

A configurable drawn rectangle with border, thickness and optional rounded corners.

All Implemented Interfaces:

Insertable, java.io.Serializable, java.awt.MenuContainer, java.awt.image.ImageObserver, HasGetTransferHandler,

java.io.Serializable, javax.accessibility.Accessible, PropertyController, Groupable, java.awt.event.MouseListener,

java.io.Serializable, StateEditable

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Fields inherited from interface javax.swing.undo.StateEditable

RCSID

Fields inherited from interface com.cafean.client.ui.beans.PropertyController

ALL, COLOR_OPTIONAL, DISABLED, NONE, OPTIONAL, REQUIRED

Constructor Summary

A-640
public RectangularAnnotation()

Creates a new instance of RectangularAnnotation

Method Summary

double getArcHeight()

Getter for property arcHeight.

double getArcWidth()

Getter for property arcWidth.

java.awt.Color getBackground()

java.awt.Color getForeground()

int getLineThickness()

Getter for property lineThickness.

AbstractInsertHandler getNewInsertHandler(ZoomablePanel parent)

boolean isFilled()

boolean isOpaque()

boolean isRounded()

Returns true if this annotation has rounded corners.

void paintComponent(java.awt.Graphics g)

void popupEditor()

void resetSize()

This resets the current size of the annotation. This ensures that all annotations do not lose any

data when the scale changes.

void setArcHeight(double arcHeight)

Setter for property arcHeight.

void setArcWidth(double arcWidth)

Setter for property arcWidth.

void setBackground(java.awt.Color bg)

void setEqualTo(RectangularAnnotation annotation)

Sets this annotation equal to the given annotation

void setFilled(boolean filled)

void setForeground(java.awt.Color fg)

A-641
void setLineThickness(int lineThickness)

Setter for property lineThickness.

void setRounded(boolean rounded)

Sets this annotations rounded corner property.

Methods inherited from class com.cafean.client.ui.annotation.Annotation

addPopupMenuItems, getAttributeIndex, getBorder, getBounds, getDrawnView, getGroupID,

getHeight, getWidth, isGroupIDValid, isPropertyActive, isPropertyEnabled,

isPropertyRequired, isPropertyResizable, isPropertyRestartEditable, isRestartResizable,

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, moveTo,

popupEditor, print, refresh, repaint, resetSize, restoreState, setBorder, setBounds,

setGroupID, setGroupIDValid, setHeight, setWidth, store, storeState, toString

Methods inherited from class javax.swing.JPanel

getAccessibleContext, getUI, getUIClassID, setUI, updateUI

Methods inherited from class javax.swing.JComponent

addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

A-642
add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-643
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-644
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface javax.swing.undo.StateEditable

restoreState, storeState

Methods inherited from interface java.awt.event.MouseListener

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased

Methods inherited from interface com.cafean.client.ui.util.Groupable

getGroupID, isGroupIDValid, setGroupID, setGroupIDValid

Methods inherited from interface com.cafean.client.ui.beans.PropertyController

getAttributeIndex, isPropertyActive, isPropertyEnabled, isPropertyRequired,

isPropertyResizable, isPropertyRestartEditable, isRestartResizable

Methods inherited from interface com.cafean.client.ui.tools.insert.Insertable

getNewInsertHandler

Constructors

RectangularAnnotation

public RectangularAnnotation()

Creates a new instance of RectangularAnnotation

Methods

paintComponent

public void paintComponent(java.awt.Graphics g)

setFilled

public void setFilled(boolean filled)

A-645
isFilled

public boolean isFilled()

isOpaque

public boolean isOpaque()

getForeground

public java.awt.Color getForeground()

getBackground

public java.awt.Color getBackground()

setForeground

public void setForeground(java.awt.Color fg)

setBackground

public void setBackground(java.awt.Color bg)

popupEditor

public void popupEditor()

This is used for Annotations to generate their editing dialogs. Since these are not components, they cannot use the Component

View editor. This should handle creating the undo object and saving the current state before implementing changes

setEqualTo

public void setEqualTo(RectangularAnnotation annotation)

Sets this annotation equal to the given annotation

resetSize

public void resetSize()

This resets the current size of the annotation. This ensures that all annotations do not lose any data when the scale changes.

A-646
isRounded

public boolean isRounded()

Returns true if this annotation has rounded corners.

setRounded

public void setRounded(boolean rounded)

Sets this annotations rounded corner property.

getArcWidth

public double getArcWidth()

Getter for property arcWidth.

Returns:

Value of property arcWidth.

setArcWidth

public void setArcWidth(double arcWidth)

Setter for property arcWidth.

Parameters:

arcWidth - New value of property arcWidth.

getArcHeight

public double getArcHeight()

Getter for property arcHeight.

Returns:

Value of property arcHeight.

setArcHeight

public void setArcHeight(double arcHeight)

Setter for property arcHeight.

Parameters:

arcHeight - New value of property arcHeight.

getLineThickness

public int getLineThickness()

Getter for property lineThickness.

A-647
Returns:

Value of property lineThickness.

setLineThickness

public void setLineThickness(int lineThickness)

Setter for property lineThickness.

Parameters:

lineThickness - New value of property lineThickness.

getNewInsertHandler

public AbstractInsertHandler getNewInsertHandler(ZoomablePanel parent)

A-648
com.cafean.client.ui.annotation

Class TextAnnotation

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JPanel

 |

 +-com.cafean.client.ui.annotation.Annotation

 |

 +-com.cafean.client.ui.annotation.TextAnnotation

public class TextAnnotation

extends Annotation

All Implemented Interfaces:

java.io.Serializable, java.awt.MenuContainer, java.awt.image.ImageObserver, HasGetTransferHandler,

java.io.Serializable, javax.accessibility.Accessible, PropertyController, Groupable, java.awt.event.MouseListener,

java.io.Serializable, StateEditable

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Fields inherited from interface javax.swing.undo.StateEditable

RCSID

Fields inherited from interface com.cafean.client.ui.beans.PropertyController

ALL, COLOR_OPTIONAL, DISABLED, NONE, OPTIONAL, REQUIRED

Constructor Summary

public TextAnnotation()

Creates a new instance of TextAnnotation

A-649
Method Summary

void addNotify()

void doLayout()

Resets the size of the label and the text annotation to be slightly larger then the prefered size of

the label.

void ensureVersion21()

Updates the font, text and color values of this TextAnnotation to compensate for an older

version which used only the JLabel properties.

java.awt.Color getBackground()

java.awt.Color getForeground()

JLabel getLabel()

Getter for property label.

String getText()

int getTextMargin()

Getter for property textMargin.

boolean isFilled()

gets this annotation's "Fill Background" property

boolean isOpaque()

Returns false as this annotation must be treated as a non-opaque component by swing in

paintImmediately.

static void main(String[] args)

void popupEditor()

void resetSize()

void restoreState(Hashtable state)

Restore the state of the bean from an earlier edit.

void setBackground(java.awt.Color bg)

void setFilled(boolean filled)

sets this annotation's "Fill Background" property

void setFont(java.awt.Font font)

void setForeground(java.awt.Color fg)

void setLabel(JLabel label)

Setter for property label.

A-650
void setOpaque(boolean opaque)

overrides setOpaque to set this annotation's "Fill Background" property

void setText(String text)

void setTextMargin(int textMargin)

Setter for property textMargin.

void storeState(Hashtable state)

Store the state of the bean to permit undo.

Methods inherited from class com.cafean.client.ui.annotation.Annotation

addPopupMenuItems, getAttributeIndex, getBorder, getBounds, getDrawnView, getGroupID,

getHeight, getWidth, isGroupIDValid, isPropertyActive, isPropertyEnabled,

isPropertyRequired, isPropertyResizable, isPropertyRestartEditable, isRestartResizable,

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, moveTo,

popupEditor, print, refresh, repaint, resetSize, restoreState, setBorder, setBounds,

setGroupID, setGroupIDValid, setHeight, setWidth, store, storeState, toString

Methods inherited from class javax.swing.JPanel

getAccessibleContext, getUI, getUIClassID, setUI, updateUI

Methods inherited from class javax.swing.JComponent

addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

A-651
Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-652
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-653
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface javax.swing.undo.StateEditable

restoreState, storeState

Methods inherited from interface java.awt.event.MouseListener

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased

Methods inherited from interface com.cafean.client.ui.util.Groupable

getGroupID, isGroupIDValid, setGroupID, setGroupIDValid

Methods inherited from interface com.cafean.client.ui.beans.PropertyController

getAttributeIndex, isPropertyActive, isPropertyEnabled, isPropertyRequired,

isPropertyResizable, isPropertyRestartEditable, isRestartResizable

Constructors

TextAnnotation

public TextAnnotation()

Creates a new instance of TextAnnotation

Methods

storeState

public void storeState(Hashtable state)

Store the state of the bean to permit undo. NOTE: If the component storing its state needs a deep copy that it's clone() method

does not provide, it must override storeState to find that functionality elsewhere.

Parameters:

state - A hash table containing modified parameters.

restoreState

public void restoreState(Hashtable state)

Restore the state of the bean from an earlier edit.

Parameters:

state - A hash table containing modified parameters.

A-654
popupEditor

public void popupEditor()

This is used for Annotations to generate their editing dialogs. Since these are not components, they cannot use the Component

View editor. This should handle creating the undo object and saving the current state before implementing changes

getText

public String getText()

main

public static void main(String[] args)

setText

public void setText(String text)

setFont

public void setFont(java.awt.Font font)

getForeground

public java.awt.Color getForeground()

getBackground

public java.awt.Color getBackground()

setForeground

public void setForeground(java.awt.Color fg)

setBackground

public void setBackground(java.awt.Color bg)

A-655
addNotify

public void addNotify()

getLabel

public JLabel getLabel()

Getter for property label.

Returns:

Value of property label.

setLabel

public void setLabel(JLabel label)

Setter for property label.

Parameters:

label - New value of property label.

doLayout

public void doLayout()

Resets the size of the label and the text annotation to be slightly larger then the prefered size of the label.

resetSize

public void resetSize()

This resets the current size of the annotation. This ensures that all annotations do not lose any data when the scale changes.

ensureVersion21

public void ensureVersion21()

Updates the font, text and color values of this TextAnnotation to compensate for an older version which used only the JLabel

properties.

getTextMargin

public int getTextMargin()

Getter for property textMargin.

Returns:

Value of property textMargin.

A-656
setTextMargin

public void setTextMargin(int textMargin)

Setter for property textMargin.

Parameters:

textMargin - New value of property textMargin.

setFilled

public void setFilled(boolean filled)

sets this annotation's "Fill Background" property

isFilled

public boolean isFilled()

gets this annotation's "Fill Background" property

setOpaque

public void setOpaque(boolean opaque)

overrides setOpaque to set this annotation's "Fill Background" property

isOpaque

public boolean isOpaque()

Returns false as this annotation must be treated as a non-opaque component by swing in paintImmediately.

A-657
Package

com.cafean.client.ui.beans

This package contains the bean-based editors provided for use in plug-ins. 

Plug-in writers should take note of the following classes before creating editors for particular types.

• BooleanEditor

• BorderStyleEditor

• ComponentSelectionEditor

• IntrospectingEditor

• NamedIntEditor

• PropertyController

• RealArrayEditor

• RealBeanEditor

A-658
com.cafean.client.ui.beans

Class BooleanEditor

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JPanel

 |

 +-com.cafean.client.ui.beans.BooleanEditor

public class BooleanEditor

extends JPanel

implements javax.accessibility.Accessible, java.io.Serializable, HasGetTransferHandler,

java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.beans.PropertyEditor

This is ths radio-button form of a Boolean value editor used in the PropertySetPanel and its associated components. The layout logic

for this editor will shorten each radio button's text to a single character when the editor's width is too narrow to display the full text. 

Simple extensions of this editor can be created to change the text displayed on each radio button from "True"/"False" to strings that

may be more appropriate for certain values such as "Yes"/"No" or "Enabled"/"Disabled".

All Implemented Interfaces:

java.beans.PropertyEditor, java.io.Serializable, java.awt.MenuContainer, java.awt.image.ImageObserver,

HasGetTransferHandler, java.io.Serializable, javax.accessibility.Accessible

Direct Known Subclasses:

NamelistBooleanEditor

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Constructor Summary

public BooleanEditor(String trueText, String falseText, char trueChar, char

falseChar)

Creates a new instance of BooleanEditor displaying the given text.

A-659
public BooleanEditor(String trueText, String falseText)

Creates a new instance of BooleanEditor displaying the given text.

public BooleanEditor()

Creates a new instance of BooleanEditor displaying the text "True"/"False" and 'T'/'F'.

Method Summary

String getAsText()

java.awt.Component getCustomEditor()

String getJavaInitializationString()

Does nothing, and returns null.

String[] getTags()

Does nothing, and returns null.

Object getValue()

boolean isPaintable()

void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box)

void setAsText(String text)

void setValue(Object value)

boolean supportsCustomEditor()

Methods inherited from class javax.swing.JPanel

getAccessibleContext, getUI, getUIClassID, setUI, updateUI

Methods inherited from class javax.swing.JComponent

A-660
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-661
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-662
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface java.beans.PropertyEditor

addPropertyChangeListener, getAsText, getCustomEditor, getJavaInitializationString,

getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText,

setValue, supportsCustomEditor

Constructors

BooleanEditor

public BooleanEditor(String trueText,

 String falseText,

 char trueChar,

 char falseChar)

Creates a new instance of BooleanEditor displaying the given text.

Parameters:

trueText - a String containing the text to display in the true/affirmative/yes button

falseText - a String containing the text to display in the true/affirmative/yes button

trueChar - the single character to display in the true/affirmative/yes button

falseChar - the single character to display in the false/negative/no button

BooleanEditor

public BooleanEditor(String trueText,

 String falseText)

Creates a new instance of BooleanEditor displaying the given text.

Parameters:

trueText - a String containing the text to display in the true/affirmative/yes button

falseText - a String containing the text to display in the true/affirmative/yes button

BooleanEditor

public BooleanEditor()

Creates a new instance of BooleanEditor displaying the text "True"/"False" and 'T'/'F'.

Methods

getAsText

public String getAsText()

A-663
getCustomEditor

public java.awt.Component getCustomEditor()

getJavaInitializationString

public String getJavaInitializationString()

Does nothing, and returns null.

getTags

public String[] getTags()

Does nothing, and returns null.

getValue

public Object getValue()

isPaintable

public boolean isPaintable()

paintValue

public void paintValue(java.awt.Graphics gfx,

 java.awt.Rectangle box)

setAsText

public void setAsText(String text)

setValue

public void setValue(Object value)

A-664
supportsCustomEditor

public boolean supportsCustomEditor()

A-665
com.cafean.client.ui.beans

Class BorderStyleEditor

java.lang.Object

 |

 +-java.beans.PropertyEditorSupport

 |

 +-com.cafean.client.ui.beans.BorderStyleEditor

public class BorderStyleEditor

extends java.beans.PropertyEditorSupport

implements java.beans.PropertyEditor, java.awt.event.ItemListener

Custom property editor to modify the component border properties.

All Implemented Interfaces:

java.awt.event.ItemListener, java.beans.PropertyEditor

Constructor Summary

public BorderStyleEditor()

Constructor.

Method Summary

void editorChangeValue(Border newBorder)

Update the user interface to reflect the edited border properties.

String getAsText()

The property value as a human editable string.

int getBorderType(Border bord)

Determine the border type for a given border.

java.awt.Component getCustomEditor()

A component that will allow direct editing of the current property value.

String getJavaInitializationString()

This method is intended for use when generating Java code to set the value of the property.

String[] getTags()

If the property value must be one of a set of known tagged values, then this method should

return an array of the tags.

Object getValue()

Access routine for the channel name.

boolean isPaintable()

True if the class will honor the paintValue method.

A-666
void itemStateChanged(java.awt.event.ItemEvent evt)

Invoked when the combobox's state has been changed.

void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box)

Paint a representation of the value into a given area of screen real estate.

void setAsText(String s)

Set the property value by parsing a given String.

void setValue(Object o)

Set (or change) the object that is to be edited.

boolean supportsCustomEditor()

True if the propertyEditor can provide a custom editor.

Methods inherited from class java.beans.PropertyEditorSupport

addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor,

getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue,

removePropertyChangeListener, setAsText, setSource, setValue, supportsCustomEditor

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.beans.PropertyEditor

addPropertyChangeListener, getAsText, getCustomEditor, getJavaInitializationString,

getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText,

setValue, supportsCustomEditor

Methods inherited from interface java.awt.event.ItemListener

itemStateChanged

Constructors

BorderStyleEditor

public BorderStyleEditor()

Constructor.

Methods

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent evt)

Invoked when the combobox's state has been changed.

Parameters:

A-667
evt - The event object.

setValue

public void setValue(Object o)

Set (or change) the object that is to be edited.

Parameters:

o - The object to edit.

editorChangeValue

public void editorChangeValue(Border newBorder)

Update the user interface to reflect the edited border properties.

Parameters:

newBorder - The border to be used to update the user interface.

getBorderType

public int getBorderType(Border bord)

Determine the border type for a given border.

Parameters:

bord - The border to evaluate.

Returns:

The border type. 0=none,1=Raised Bevel. 2=lowered bevel, 3=etched, 4=line, 5=empty.

getValue

public Object getValue()

Access routine for the channel name.

setAsText

public void setAsText(String s)

 throws IllegalArgumentException

Set the property value by parsing a given String.

Parameters:

s - The string to be parsed.

getJavaInitializationString

public String getJavaInitializationString()

This method is intended for use when generating Java code to set the value of the property.

A-668
Returns:

A fragment of Java code that can be used to initialize a variable with the current property value.

isPaintable

public boolean isPaintable()

True if the class will honor the paintValue method.

Returns:

false

paintValue

public void paintValue(java.awt.Graphics gfx,

 java.awt.Rectangle box)

Paint a representation of the value into a given area of screen real estate. Not used here.

getAsText

public String getAsText()

The property value as a human editable string.

getTags

public String[] getTags()

If the property value must be one of a set of known tagged values, then this method should return an array of the tags. Not used

here.

getCustomEditor

public java.awt.Component getCustomEditor()

A component that will allow direct editing of the current property value.

Returns:

this.

supportsCustomEditor

public boolean supportsCustomEditor()

True if the propertyEditor can provide a custom editor.

Returns:

true.

A-669
com.cafean.client.ui.beans

Class ComponentSelectionEditor

java.lang.Object

 |

 +-com.cafean.client.ui.beans.ComponentSelectionEditor

public class ComponentSelectionEditor

extends Object

implements ModelDependent, java.beans.PropertyEditor

This bean editor contains a JPanel with a label and a button. This allows the user to select a component from the current model. Plugin

specific extensions can be created that initialize the category value, which will limit the selection scope by that category.

All Implemented Interfaces:

java.beans.PropertyEditor, ModelDependent

Constructor Summary

public ComponentSelectionEditor(Category category, boolean allowEmpty)

Creates a new instance of CellComponentSelector

public ComponentSelectionEditor()

Creates a new instance of CellComponentSelector

Method Summary

void addPropertyChangeListener(java.beans.PropertyChangeListener

propertyChangeListener)

void firePropertyChange(String propertyName, Object oldValue, Object newValue)

String getAsText()

Category getCategory()

Gets the Category for this ComponentSelectionEditor.

java.awt.Component getCustomEditor()

String getJavaInitializationString()

Does nothing, and returns null.

AbstractModel getModel()

java.beans.PropertyCh

angeListener

getPropertyChangeListener(int index)

Returns the PropertyChangeListener at the given index.

int getPropertyChangeListenerCount()

Returns the number of property change listeners.

A-670
TableCellEditor getTableCellEditor()

Method allows this panel to be used in JTable as an editor

TableCellRenderer getTableCellRenderer()

Returns a TableCellRenderer that displays contents of this ComponentSelectionEditor.

String[] getTags()

Does nothing, and returns null.

Object getValue()

boolean isCancelled()

boolean isPaintable()

void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box)

void removePropertyChangeListener(java.beans.PropertyChangeListener

propertyChangeListener)

void setAsText(String text)

void setAvailable(AbstractComponent[] components)

void setCategory(Category category)

Sets the Category for this ComponentSelectionEditor.

void setCreator(ComponentCreator creator)

This sets the ComponentCreator that can be used to create new instances of the

AbstractComponent this selector is supposed to select between

void setEditable(boolean e)

void setFont(java.awt.Font font)

Sets the font on the label for this ComponentSelectionEditor.

void setModel(AbstractModel model)

void setValue(Object value)

boolean supportsCustomEditor()

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface com.cafean.client.analysis.ModelDependent

getModel, setModel

A-671
Methods inherited from interface java.beans.PropertyEditor

addPropertyChangeListener, getAsText, getCustomEditor, getJavaInitializationString,

getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText,

setValue, supportsCustomEditor

Constructors

ComponentSelectionEditor

public ComponentSelectionEditor(Category category,

 boolean allowEmpty)

Creates a new instance of CellComponentSelector

ComponentSelectionEditor

public ComponentSelectionEditor()

Creates a new instance of CellComponentSelector

Methods

setAvailable

public void setAvailable(AbstractComponent[] components)

isCancelled

public boolean isCancelled()

setEditable

public void setEditable(boolean e)

getAsText

public String getAsText()

getCustomEditor

public java.awt.Component getCustomEditor()

A-672
getJavaInitializationString

public String getJavaInitializationString()

Does nothing, and returns null.

getTags

public String[] getTags()

Does nothing, and returns null.

getValue

public Object getValue()

isPaintable

public boolean isPaintable()

setFont

public void setFont(java.awt.Font font)

Sets the font on the label for this ComponentSelectionEditor.

setCreator

public void setCreator(ComponentCreator creator)

This sets the ComponentCreator that can be used to create new instances of the AbstractComponent this selector is supposed to

select between

paintValue

public void paintValue(java.awt.Graphics gfx,

 java.awt.Rectangle box)

setAsText

public void setAsText(String text)

 throws IllegalArgumentException

A-673
setValue

public void setValue(Object value)

supportsCustomEditor

public boolean supportsCustomEditor()

getCategory

public Category getCategory()

Gets the Category for this ComponentSelectionEditor.

Returns:

the Category of the component reference.

setCategory

public void setCategory(Category category)

Sets the Category for this ComponentSelectionEditor.

Parameters:

category - the Category of the component reference.

getModel

public AbstractModel getModel()

setModel

public void setModel(AbstractModel model)

getTableCellEditor

public TableCellEditor getTableCellEditor()

Method allows this panel to be used in JTable as an editor

Returns:

TableCellEdtior value to be used to edit JTable cells;

getTableCellRenderer

public TableCellRenderer getTableCellRenderer()

A-674
Returns a TableCellRenderer that displays contents of this ComponentSelectionEditor.

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener

propertyChangeListener)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener

propertyChangeListener)

getPropertyChangeListener

public java.beans.PropertyChangeListener getPropertyChangeListener(int index)

Returns the PropertyChangeListener at the given index.

getPropertyChangeListenerCount

public int getPropertyChangeListenerCount()

Returns the number of property change listeners.

firePropertyChange

public void firePropertyChange(String propertyName,

 Object oldValue,

 Object newValue)

A-675
com.cafean.client.ui.beans

Interface DecoratedBean

public interface DecoratedBean

extends 

An interface describing a bean customized for display in a Navigator type list. The decorations include HTML (including font colors or

styles) and the current icon for the bean.

Method Summary

ImageIcon getCurrentIcon()

Retrieves an appropriate icon for displaying the current state of this bean.

String toShortHtml()

Retrieves an HTML version of the toString of this bean for use in displaying this bean in the

Navigator or other similar listings.

Methods

toShortHtml

public String toShortHtml()

Retrieves an HTML version of the toString of this bean for use in displaying this bean in the Navigator or other similar listings.

getCurrentIcon

public ImageIcon getCurrentIcon()

Retrieves an appropriate icon for displaying the current state of this bean.

A-676
com.cafean.client.ui.beans

Class IntNonMultiEdit

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JPanel

 |

 +-com.cafean.client.ui.beans.IntNonMultiEdit

public class IntNonMultiEdit

extends JPanel

implements javax.accessibility.Accessible, java.io.Serializable, HasGetTransferHandler,

java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.beans.PropertyEditor

This editor allows the user edit a integer that can't be multi-edited. This includes component numbers.

All Implemented Interfaces:

java.beans.PropertyEditor, java.io.Serializable, java.awt.MenuContainer, java.awt.image.ImageObserver,

HasGetTransferHandler, java.io.Serializable, javax.accessibility.Accessible

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Constructor Summary

public IntNonMultiEdit()

Creates new form IntNonMultiEdit

Method Summary

String getAsText()

java.awt.Component getCustomEditor()

A-677
String getJavaInitializationString()

String[] getTags()

Object getValue()

boolean isPaintable()

void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box)

void setAsText(String text)

void setValue(Object value)

boolean supportsCustomEditor()

Methods inherited from class javax.swing.JPanel

getAccessibleContext, getUI, getUIClassID, setUI, updateUI

Methods inherited from class javax.swing.JComponent

addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

A-678
Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-679
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-680
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface java.beans.PropertyEditor

addPropertyChangeListener, getAsText, getCustomEditor, getJavaInitializationString,

getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText,

setValue, supportsCustomEditor

Constructors

IntNonMultiEdit

public IntNonMultiEdit()

Creates new form IntNonMultiEdit

Methods

getAsText

public String getAsText()

getCustomEditor

public java.awt.Component getCustomEditor()

isPaintable

public boolean isPaintable()

getJavaInitializationString

public String getJavaInitializationString()

getTags

public String[] getTags()

A-681
paintValue

public void paintValue(java.awt.Graphics gfx,

 java.awt.Rectangle box)

getValue

public Object getValue()

setAsText

public void setAsText(String text)

 throws IllegalArgumentException

setValue

public void setValue(Object value)

supportsCustomEditor

public boolean supportsCustomEditor()

A-682
com.cafean.client.ui.beans

Interface IntrospectingEditor

public interface IntrospectingEditor

extends java.beans.PropertyEditor

An interface for PropertyEditors that use introspection to initialize themselves and to create new instances of the property they edit. 

This is a functional equivalent interface to the SwingEditorSupport base class.

All Known Implementing Classes:

LimitedLongStringEditor, RealArrayEditor, RealBeanEditor

See Also:

javax.swing.beaninfo.SwingEditorSupport

Method Summary

void init(java.beans.PropertyDescriptor descriptor)

For property editors that must be initialized with values from the property descriptor.

Methods inherited from interface java.beans.PropertyEditor

addPropertyChangeListener, getAsText, getCustomEditor, getJavaInitializationString,

getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText,

setValue, supportsCustomEditor

Methods

init

public void init(java.beans.PropertyDescriptor descriptor)

For property editors that must be initialized with values from the property descriptor.

A-683
com.cafean.client.ui.beans

Class IntSpinnerEditor

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JPanel

 |

 +-com.cafean.client.ui.beans.IntSpinnerEditor

public class IntSpinnerEditor

extends JPanel

implements javax.accessibility.Accessible, java.io.Serializable, HasGetTransferHandler,

java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.beans.PropertyEditor

This simple editor allows the user to select within a range of integer values. The range is defined either with the constructor or with

setter methods.

All Implemented Interfaces:

java.beans.PropertyEditor, java.io.Serializable, java.awt.MenuContainer, java.awt.image.ImageObserver,

HasGetTransferHandler, java.io.Serializable, javax.accessibility.Accessible

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Constructor Summary

public IntSpinnerEditor()

Creates new form IntSpinnerEditor

public IntSpinnerEditor(int minimum, int maximum, int increment)

This creates a new IntSpinnerEditor with the given values.

public IntSpinnerEditor(int minimum, int maximum, int increment, boolean

showSize)

This creates a new IntSpinnerEditor with the given values.

A-684
Method Summary

String getAsText()

java.awt.Component getCustomEditor()

String getJavaInitializationString()

String[] getTags()

Object getValue()

boolean isPaintable()

void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box)

void setAsText(String text)

void setIncrement(int increment)

Sets the step size of the selection range.

void setMaximum(int maximum)

Sets the maximum value for the selection range.

void setMinimum(int minimum)

Sets the minimum value for the selection range.

void setShowSize(boolean showSize)

This flag hides or shows the label displaying the maximum allowable value for the spinner.

void setValue(Object value)

boolean supportsCustomEditor()

Methods inherited from class javax.swing.JPanel

getAccessibleContext, getUI, getUIClassID, setUI, updateUI

Methods inherited from class javax.swing.JComponent

A-685
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-686
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-687
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface java.beans.PropertyEditor

addPropertyChangeListener, getAsText, getCustomEditor, getJavaInitializationString,

getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText,

setValue, supportsCustomEditor

Constructors

IntSpinnerEditor

public IntSpinnerEditor()

Creates new form IntSpinnerEditor

IntSpinnerEditor

public IntSpinnerEditor(int minimum,

 int maximum,

 int increment)

This creates a new IntSpinnerEditor with the given values. Note that PropertyEditor instances are created using the default noarg constructor. To use this constructor a sub-class must be created and used as the editor.

Parameters:

minimum - the minimum value for the selection.

maximum - the maximum value for the selectin.

increment - the step size for the selection.

IntSpinnerEditor

public IntSpinnerEditor(int minimum,

 int maximum,

 int increment,

 boolean showSize)

This creates a new IntSpinnerEditor with the given values. Note that PropertyEditor instances are created using the default noarg constructor. To use this constructor a sub-class must be created and used as the editor.

Parameters:

minimum - the minimum value for the selection.

maximum - the maximum value for the selectin.

increment - the step size for the selection.

showSize - sets whether the label displaying the current size is visible.

Methods

A-688
setMinimum

public void setMinimum(int minimum)

Sets the minimum value for the selection range.

setMaximum

public void setMaximum(int maximum)

Sets the maximum value for the selection range. This also updates the size label to reflect the maximum value. If the maximum

is set to Integer.MAX_VALUE the size label's text is set empty.

setShowSize

public void setShowSize(boolean showSize)

This flag hides or shows the label displaying the maximum allowable value for the spinner.

setIncrement

public void setIncrement(int increment)

Sets the step size of the selection range.

getValue

public Object getValue()

setValue

public void setValue(Object value)

getAsText

public String getAsText()

setAsText

public void setAsText(String text)

 throws IllegalArgumentException

getJavaInitializationString

public String getJavaInitializationString()

A-689
getTags

public String[] getTags()

isPaintable

public boolean isPaintable()

paintValue

public void paintValue(java.awt.Graphics gfx,

 java.awt.Rectangle box)

getCustomEditor

public java.awt.Component getCustomEditor()

supportsCustomEditor

public boolean supportsCustomEditor()

A-690
com.cafean.client.ui.beans

Class LimitedLongStringEditor

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JPanel

 |

 +-com.cafean.client.ui.beans.PropertyEditorPanelSupport

 |

 +-com.cafean.client.ui.beans.LimitedLongStringEditor

public class LimitedLongStringEditor

extends PropertyEditorPanelSupport

implements java.beans.PropertyEditor, java.awt.event.ActionListener, javax.accessibility.Accessible,

java.io.Serializable, HasGetTransferHandler, java.awt.image.ImageObserver, java.awt.MenuContainer,

java.io.Serializable, IntrospectingEditor

This bean editor contains a JPanel with a label and a button. This allows the user to edit long strings in a text area, and displays the first

80 characters in the label. 

This editor is considered limited in that it includes a maximum line length. Lines longer than this length will be wrapped.

All Implemented Interfaces:

IntrospectingEditor, java.io.Serializable, java.awt.MenuContainer, java.awt.image.ImageObserver,

HasGetTransferHandler, java.io.Serializable, javax.accessibility.Accessible, java.awt.event.ActionListener,

java.beans.PropertyEditor

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Constructor Summary

public LimitedLongStringEditor(String title, int linelength)

Creates a new instance of LimitedLongStringEditor with the given title and line length Note

that PropertyEditor instances are created using the default no-arg constructor.

A-691
public LimitedLongStringEditor()

Creates a new instance of LimitedLongStringEditor with no title and a line length of 80

Method Summary

void actionPerformed(java.awt.event.ActionEvent e)

void init(java.beans.PropertyDescriptor descriptor)

void updateLabel()

Methods inherited from class com.cafean.client.ui.beans.PropertyEditorPanelSupport

getAsText, getCustomEditor, getJavaInitializationString, getTags, getValue, isPaintable,

paintValue, setAsText, setFont, setForeground, setTextLabelString, setValue,

supportsCustomEditor, updateLabel, updateValue

Methods inherited from class javax.swing.JPanel

getAccessibleContext, getUI, getUIClassID, setUI, updateUI

Methods inherited from class javax.swing.JComponent

addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

A-692
add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-693
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-694
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface java.beans.PropertyEditor

addPropertyChangeListener, getAsText, getCustomEditor, getJavaInitializationString,

getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText,

setValue, supportsCustomEditor

Methods inherited from interface java.awt.event.ActionListener

actionPerformed

Methods inherited from interface com.cafean.client.ui.beans.IntrospectingEditor

init

Methods inherited from interface java.beans.PropertyEditor

addPropertyChangeListener, getAsText, getCustomEditor, getJavaInitializationString,

getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText,

setValue, supportsCustomEditor

Constructors

LimitedLongStringEditor

public LimitedLongStringEditor(String title,

 int linelength)

Creates a new instance of LimitedLongStringEditor with the given title and line length Note that PropertyEditor instances are

created using the default no-arg constructor. To use this constructor a sub-class must be created and used as the editor.

LimitedLongStringEditor

public LimitedLongStringEditor()

Creates a new instance of LimitedLongStringEditor with no title and a line length of 80

Methods

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)

A-695
updateLabel

public void updateLabel()

Override this to customize the label text.

init

public void init(java.beans.PropertyDescriptor descriptor)

A-696
com.cafean.client.ui.beans

Class LongStringEditor

java.lang.Object

 |

 +-java.beans.PropertyEditorSupport

 |

 +-com.cafean.client.ui.beans.LongStringEditor

public class LongStringEditor

extends java.beans.PropertyEditorSupport

This bean editor contains a JPanel with a label and a button. This allows the user to edit long strings in a text area, and displays the first

80 characters in the label.

All Implemented Interfaces:

java.beans.PropertyEditor

Constructor Summary

public LongStringEditor(String title)

Creates a new instance of LongStringEditor with the given title

public LongStringEditor()

Creates a new instance of LongStringEditor with no title

Method Summary

void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

java.awt.Component getCustomEditor()

String getJavaInitializationString()

String[] getTags()

Object getValue()

boolean isPaintable()

void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box)

void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

void setAsText(String text)

void setValue(Object value)

A-697
boolean supportsCustomEditor()

Methods inherited from class java.beans.PropertyEditorSupport

addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor,

getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue,

removePropertyChangeListener, setAsText, setSource, setValue, supportsCustomEditor

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.beans.PropertyEditor

addPropertyChangeListener, getAsText, getCustomEditor, getJavaInitializationString,

getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText,

setValue, supportsCustomEditor

Constructors

LongStringEditor

public LongStringEditor(String title)

Creates a new instance of LongStringEditor with the given title

LongStringEditor

public LongStringEditor()

Creates a new instance of LongStringEditor with no title

Methods

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

getCustomEditor

public java.awt.Component getCustomEditor()

getJavaInitializationString

public String getJavaInitializationString()

A-698
getTags

public String[] getTags()

getValue

public Object getValue()

isPaintable

public boolean isPaintable()

paintValue

public void paintValue(java.awt.Graphics gfx,

 java.awt.Rectangle box)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

setAsText

public void setAsText(String text)

setValue

public void setValue(Object value)

supportsCustomEditor

public boolean supportsCustomEditor()

A-699
com.cafean.client.ui.beans

Class NamedIntEditor

java.lang.Object

 |

 +-java.beans.PropertyEditorSupport

 |

 +-com.cafean.client.ui.beans.NamedIntEditor

public class NamedIntEditor

extends java.beans.PropertyEditorSupport

implements java.beans.PropertyEditor, java.awt.event.ItemListener, ModelDependent

This bean editor contains a JComboBox for selecting between named integers. 

Example:

All Implemented Interfaces:

ModelDependent, java.awt.event.ItemListener, java.beans.PropertyEditor

Direct Known Subclasses:

NamelistNamedIntEditor

public class OnOffSelEditor

 extends NamedIntEditor

{

 // the option values

 private static final int[] optVal = {0, 1};

 // the option descriptions

 private static final String[] optStr = {"Off", "On"};

 // Creates a new instance of OnOffSelEditor

 public OnOffSelEditor() {

 super( optStr, optVal );

 setShowNumbers(false);

 }

}

Field Summary

public static final DIFF_VAL

Value: -2147483647

public static final INACTIVE

Value: -2147483648

A-700
public static final UNKNOWN

Value: 2147483647

Constructor Summary

public NamedIntEditor()

Creates a new instance of NamedIntEditor

public NamedIntEditor(String[] strings, int[] numbers)

Creates a new instance of NamedIntEditor for use in editing the given set of enumerated

integers and their associated string descriptions.

Method Summary

String getAsText()

java.awt.Component getCustomEditor()

String getJavaInitializationString()

Does nothing, and returns null.

AbstractModel getModel()

String[] getTags()

Does nothing, and returns null.

Object getValue()

boolean isPaintable()

boolean isShowNumbers()

Getter for property showNumbers.

void itemStateChanged(java.awt.event.ItemEvent e)

void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box)

void setAsText(String text)

void setContext(PropertyController owner, java.beans.PropertyDescriptor

descriptor)

Sets the owner and the description of the property currently being edited by this editor.

void setFireGlobalEvents(boolean fire)

If set to true this editor will call AbstractComponent.fireComponentChanged() and

create an undoable edit when the active value is changed.

void setModel(AbstractModel model)

A-701
void setShowNumbers(boolean showNumbers)

Setter for property showNumbers.

void setValue(Object value)

boolean supportsCustomEditor()

Methods inherited from class java.beans.PropertyEditorSupport

addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor,

getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue,

removePropertyChangeListener, setAsText, setSource, setValue, supportsCustomEditor

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.beans.PropertyEditor

addPropertyChangeListener, getAsText, getCustomEditor, getJavaInitializationString,

getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText,

setValue, supportsCustomEditor

Methods inherited from interface java.awt.event.ItemListener

itemStateChanged

Methods inherited from interface com.cafean.client.analysis.ModelDependent

getModel, setModel

Fields

DIFF_VAL

public static final int DIFF_VAL

Constant value: -2147483647

UNKNOWN

public static final int UNKNOWN

Constant value: 2147483647

INACTIVE

public static final int INACTIVE

A-702
Constant value: -2147483648

Constructors

NamedIntEditor

public NamedIntEditor()

Creates a new instance of NamedIntEditor

NamedIntEditor

public NamedIntEditor(String[] strings,

 int[] numbers)

Creates a new instance of NamedIntEditor for use in editing the given set of enumerated integers and their associated string

descriptions.

Methods

setFireGlobalEvents

public void setFireGlobalEvents(boolean fire)

If set to true this editor will call AbstractComponent.fireComponentChanged() and create an undoable edit when the

active value is changed.

Parameters:

fire - true or false; defaults to false

setContext

public void setContext(PropertyController owner,

 java.beans.PropertyDescriptor descriptor)

Sets the owner and the description of the property currently being edited by this editor. Extensions of this editor that require the

namelist functionality must implement NamelistEditor.

Parameters:

owner - the PropertyController that owns the property being edited by this editor. This may be null.

descriptor - a PropertyDescriptor describing the property being edited by this editor.

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)

getAsText

public String getAsText()

A-703
getCustomEditor

public java.awt.Component getCustomEditor()

getJavaInitializationString

public String getJavaInitializationString()

Does nothing, and returns null.

getTags

public String[] getTags()

Does nothing, and returns null.

getValue

public Object getValue()

isPaintable

public boolean isPaintable()

paintValue

public void paintValue(java.awt.Graphics gfx,

 java.awt.Rectangle box)

setAsText

public void setAsText(String text)

 throws IllegalArgumentException

setValue

public void setValue(Object value)

supportsCustomEditor

public boolean supportsCustomEditor()

A-704
isShowNumbers

public boolean isShowNumbers()

Getter for property showNumbers.

Returns:

Value of property showNumbers.

setShowNumbers

public void setShowNumbers(boolean showNumbers)

Setter for property showNumbers.

Parameters:

showNumbers - New value of property showNumbers.

getModel

public AbstractModel getModel()

setModel

public void setModel(AbstractModel model)

A-705
com.cafean.client.ui.beans

Class NamelistBooleanEditor

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JPanel

 |

 +-com.cafean.client.ui.beans.BooleanEditor

 |

 +-com.cafean.client.ui.beans.NamelistBooleanEditor

public class NamelistBooleanEditor

extends BooleanEditor

implements java.beans.PropertyEditor, javax.accessibility.Accessible, java.io.Serializable,

HasGetTransferHandler, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable,

NamelistEditor, java.awt.event.ItemListener, ModelDependent

This is an editor for a namelist style boolean value that can be activated and deactivated.

All Implemented Interfaces:

ModelDependent, java.awt.event.ItemListener, NamelistEditor, java.io.Serializable, java.awt.MenuContainer,

java.awt.image.ImageObserver, HasGetTransferHandler, java.io.Serializable, javax.accessibility.Accessible,

java.beans.PropertyEditor

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Constructor Summary

public NamelistBooleanEditor()

Creates a new instance of NamelistBooleanEditor

public NamelistBooleanEditor(String trueText, String falseText)

Creates a new instance of NamelistBooleanEditor

Method Summary

A-706
void firePropertyChange()

Report that we have been modified to any interested listeners.

AbstractModel getModel()

void itemStateChanged(java.awt.event.ItemEvent e)

void setContext(PropertyController owner, java.beans.PropertyDescriptor

descriptor)

Sets the owner and the description of the property currently being edited by this editor.

void setFireGlobalEvents(boolean fire)

If set to true this editor will call AbstractComponent.fireComponentChanged() and

create an undoable edit when the active value is changed.

void setModel(AbstractModel model)

void setValue(Object value)

Methods inherited from class com.cafean.client.ui.beans.BooleanEditor

getAsText, getCustomEditor, getJavaInitializationString, getTags, getValue, isPaintable,

paintValue, setAsText, setValue, supportsCustomEditor

Methods inherited from class javax.swing.JPanel

getAccessibleContext, getUI, getUIClassID, setUI, updateUI

Methods inherited from class javax.swing.JComponent

A-707
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-708
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-709
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface java.beans.PropertyEditor

addPropertyChangeListener, getAsText, getCustomEditor, getJavaInitializationString,

getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText,

setValue, supportsCustomEditor

Methods inherited from interface com.cafean.client.ui.beans.NamelistEditor

setContext

Methods inherited from interface java.awt.event.ItemListener

itemStateChanged

Methods inherited from interface com.cafean.client.analysis.ModelDependent

getModel, setModel

Constructors

NamelistBooleanEditor

public NamelistBooleanEditor()

Creates a new instance of NamelistBooleanEditor

NamelistBooleanEditor

public NamelistBooleanEditor(String trueText,

 String falseText)

Creates a new instance of NamelistBooleanEditor

Methods

setFireGlobalEvents

public void setFireGlobalEvents(boolean fire)

If set to true this editor will call AbstractComponent.fireComponentChanged() and create an undoable edit when the

active value is changed.

Parameters:

fire - true or false; defaults to false

A-710
setValue

public void setValue(Object value)

setContext

public void setContext(PropertyController owner,

 java.beans.PropertyDescriptor descriptor)

Sets the owner and the description of the property currently being edited by this editor.

Parameters:

owner - the PropertyController that owns the property being edited by this editor. This may be null.

descriptor - a PropertyDescriptor describing the property being edited by this editor.

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)

firePropertyChange

public void firePropertyChange()

Report that we have been modified to any interested listeners.

getModel

public AbstractModel getModel()

setModel

public void setModel(AbstractModel model)

A-711
com.cafean.client.ui.beans

Class NamelistDoubleEditor

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JPanel

 |

 +-com.cafean.client.ui.beans.NamelistStringEditor

 |

 +-com.cafean.client.ui.beans.NamelistDoubleEditor

public class NamelistDoubleEditor

extends NamelistStringEditor

implements NamelistEditor, java.beans.PropertyEditor, java.awt.event.ItemListener,

javax.accessibility.Accessible, java.io.Serializable, HasGetTransferHandler, java.awt.image.ImageObserver

, java.awt.MenuContainer, java.io.Serializable, NamelistEditor, java.awt.event.ItemListener,

ModelDependent

This is an editor for a namelist style double value that can be activated and deactivated.

All Implemented Interfaces:

ModelDependent, java.awt.event.ItemListener, NamelistEditor, java.io.Serializable, java.awt.MenuContainer,

java.awt.image.ImageObserver, HasGetTransferHandler, java.io.Serializable, javax.accessibility.Accessible,

java.awt.event.ItemListener, java.beans.PropertyEditor, NamelistEditor

See Also:

NamelistEditor

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Constructor Summary

public NamelistDoubleEditor()

Creates a new NamelistIntEditor

Method Summary

A-712
Object getValue()

Gets the value of the property.

Methods inherited from class com.cafean.client.ui.beans.NamelistStringEditor

getAsText, getCustomEditor, getJavaInitializationString, getModel, getTags, getValue,

init, isPaintable, itemStateChanged, paintValue, setAsText, setContext, setEnabled,

setFireGlobalEvents, setForeground, setModel, setValue, supportsCustomEditor

Methods inherited from class javax.swing.JPanel

getAccessibleContext, getUI, getUIClassID, setUI, updateUI

Methods inherited from class javax.swing.JComponent

addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

A-713
add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-714
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-715
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface com.cafean.client.ui.beans.NamelistEditor

setContext

Methods inherited from interface java.beans.PropertyEditor

addPropertyChangeListener, getAsText, getCustomEditor, getJavaInitializationString,

getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText,

setValue, supportsCustomEditor

Methods inherited from interface java.awt.event.ItemListener

itemStateChanged

Methods inherited from interface com.cafean.client.ui.beans.NamelistEditor

setContext

Methods inherited from interface java.awt.event.ItemListener

itemStateChanged

Methods inherited from interface com.cafean.client.analysis.ModelDependent

getModel, setModel

Constructors

NamelistDoubleEditor

public NamelistDoubleEditor()

Creates a new NamelistIntEditor

Methods

getValue

public Object getValue()

Gets the value of the property.

Returns:

the value of the property.

A-716
com.cafean.client.ui.beans

Interface NamelistEditor

public interface NamelistEditor

extends 

An interface describing an editor for a property that conforms to the namelist variable concept in which a property is actually a

combination of a property and a boolean activation state. 

Editors of this type assume that the following method is implemented in the object being edited:

void setPropertyActive( String propertyName )

All Known Implementing Classes:

NamelistBooleanEditor, NamelistRealEditor, NamelistIntEditor, NamelistDoubleEditor, NamelistNamedIntEditor

See Also:

PropertyController.isPropertyActive(String)

Method Summary

void setContext(PropertyController owner, java.beans.PropertyDescriptor

descriptor)

Sets the owner and the description of the property currently being edited by this editor.

Methods

setContext

public void setContext(PropertyController owner,

 java.beans.PropertyDescriptor descriptor)

Sets the owner and the description of the property currently being edited by this editor.

Parameters:

owner - the PropertyController that owns the property being edited by this editor. This may be null.

descriptor - a PropertyDescriptor describing the property being edited by this editor.

A-717
com.cafean.client.ui.beans

Class NamelistIntEditor

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JPanel

 |

 +-com.cafean.client.ui.beans.NamelistStringEditor

 |

 +-com.cafean.client.ui.beans.NamelistIntEditor

public class NamelistIntEditor

extends NamelistStringEditor

implements NamelistEditor, java.beans.PropertyEditor, java.awt.event.ItemListener,

javax.accessibility.Accessible, java.io.Serializable, HasGetTransferHandler, java.awt.image.ImageObserver

, java.awt.MenuContainer, java.io.Serializable, NamelistEditor, java.awt.event.ItemListener,

ModelDependent

This is an editor for a namelist style integer value that can be activated and deactivated.

All Implemented Interfaces:

ModelDependent, java.awt.event.ItemListener, NamelistEditor, java.io.Serializable, java.awt.MenuContainer,

java.awt.image.ImageObserver, HasGetTransferHandler, java.io.Serializable, javax.accessibility.Accessible,

java.awt.event.ItemListener, java.beans.PropertyEditor, NamelistEditor

See Also:

NamelistEditor

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Constructor Summary

public NamelistIntEditor()

Creates a new NamelistIntEditor

Method Summary

A-718
Object getValue()

Gets the value of the property.

Methods inherited from class com.cafean.client.ui.beans.NamelistStringEditor

getAsText, getCustomEditor, getJavaInitializationString, getModel, getTags, getValue,

init, isPaintable, itemStateChanged, paintValue, setAsText, setContext, setEnabled,

setFireGlobalEvents, setForeground, setModel, setValue, supportsCustomEditor

Methods inherited from class javax.swing.JPanel

getAccessibleContext, getUI, getUIClassID, setUI, updateUI

Methods inherited from class javax.swing.JComponent

addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

A-719
add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-720
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-721
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface com.cafean.client.ui.beans.NamelistEditor

setContext

Methods inherited from interface java.beans.PropertyEditor

addPropertyChangeListener, getAsText, getCustomEditor, getJavaInitializationString,

getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText,

setValue, supportsCustomEditor

Methods inherited from interface java.awt.event.ItemListener

itemStateChanged

Methods inherited from interface com.cafean.client.ui.beans.NamelistEditor

setContext

Methods inherited from interface java.awt.event.ItemListener

itemStateChanged

Methods inherited from interface com.cafean.client.analysis.ModelDependent

getModel, setModel

Constructors

NamelistIntEditor

public NamelistIntEditor()

Creates a new NamelistIntEditor

Methods

getValue

public Object getValue()

Gets the value of the property.

Returns:

the value of the property.

A-722
com.cafean.client.ui.beans

Class NamelistNamedIntEditor

java.lang.Object

 |

 +-java.beans.PropertyEditorSupport

 |

 +-com.cafean.client.ui.beans.NamedIntEditor

 |

 +-com.cafean.client.ui.beans.NamelistNamedIntEditor

public class NamelistNamedIntEditor

extends NamedIntEditor

implements java.awt.event.ItemListener, ModelDependent, java.beans.PropertyEditor, NamelistEditor

An enumeration editor for values that also include an Active state as described in NamelistEditor.

All Implemented Interfaces:

NamelistEditor, java.beans.PropertyEditor, ModelDependent, java.awt.event.ItemListener

Fields inherited from class com.cafean.client.ui.beans.NamedIntEditor

DIFF_VAL, INACTIVE, UNKNOWN

Constructor Summary

public NamelistNamedIntEditor(String[] strings, int[] numbers)

Creates a new instance of NamelistNamedIntEditor

Methods inherited from class com.cafean.client.ui.beans.NamedIntEditor

getAsText, getCustomEditor, getJavaInitializationString, getModel, getTags, getValue,

isPaintable, isShowNumbers, itemStateChanged, paintValue, setAsText, setContext,

setFireGlobalEvents, setModel, setShowNumbers, setValue, supportsCustomEditor

Methods inherited from class java.beans.PropertyEditorSupport

addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor,

getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue,

removePropertyChangeListener, setAsText, setSource, setValue, supportsCustomEditor

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.beans.PropertyEditor

addPropertyChangeListener, getAsText, getCustomEditor, getJavaInitializationString,

getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText,

setValue, supportsCustomEditor

A-723
Methods inherited from interface java.awt.event.ItemListener

itemStateChanged

Methods inherited from interface com.cafean.client.analysis.ModelDependent

getModel, setModel

Methods inherited from interface com.cafean.client.ui.beans.NamelistEditor

setContext

Constructors

NamelistNamedIntEditor

public NamelistNamedIntEditor(String[] strings,

 int[] numbers)

Creates a new instance of NamelistNamedIntEditor

A-724
com.cafean.client.ui.beans

Class NamelistRealEditor

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JPanel

 |

 +-com.cafean.client.ui.beans.RealBeanEditor

 |

 +-com.cafean.client.ui.beans.NamelistRealEditor

public class NamelistRealEditor

extends RealBeanEditor

implements IntrospectingEditor, ModelDependent, javax.accessibility.Accessible, java.io.Serializable,

HasGetTransferHandler, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable,

NamelistEditor, java.awt.event.ItemListener

An editor for values of type Real that also include an Active state as described in NamelistEditor.

All Implemented Interfaces:

java.awt.event.ItemListener, NamelistEditor, java.io.Serializable, java.awt.MenuContainer,

java.awt.image.ImageObserver, HasGetTransferHandler, java.io.Serializable, javax.accessibility.Accessible,

ModelDependent, IntrospectingEditor

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Constructor Summary

public NamelistRealEditor()

Creates a new instance of DefaultableRealEditor

Method Summary

void itemStateChanged(java.awt.event.ItemEvent e)

A-725
void setContext(PropertyController owner, java.beans.PropertyDescriptor

descriptor)

Sets the owner and the description of the property currently being edited by this editor.

void setFireGlobalEvents(boolean fire)

If set to true this editor will call AbstractComponent.fireComponentChanged() and

create an undoable edit when the active value is changed.

void setValue(Object value)

Methods inherited from class com.cafean.client.ui.beans.RealBeanEditor

firePropertyChange, getAsText, getCustomEditor, getJavaInitializationString, getModel,

getTags, getValue, init, isPaintable, paintValue, setAsText, setForeground, setModel,

setValue, supportsCustomEditor

Methods inherited from class javax.swing.JPanel

getAccessibleContext, getUI, getUIClassID, setUI, updateUI

Methods inherited from class javax.swing.JComponent

addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

A-726
add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-727
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-728
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface com.cafean.client.ui.beans.IntrospectingEditor

init

Methods inherited from interface java.beans.PropertyEditor

addPropertyChangeListener, getAsText, getCustomEditor, getJavaInitializationString,

getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText,

setValue, supportsCustomEditor

Methods inherited from interface com.cafean.client.analysis.ModelDependent

getModel, setModel

Methods inherited from interface com.cafean.client.ui.beans.NamelistEditor

setContext

Methods inherited from interface java.awt.event.ItemListener

itemStateChanged

Constructors

NamelistRealEditor

public NamelistRealEditor()

Creates a new instance of DefaultableRealEditor

Methods

setFireGlobalEvents

public void setFireGlobalEvents(boolean fire)

If set to true this editor will call AbstractComponent.fireComponentChanged() and create an undoable edit when the

active value is changed.

Parameters:

fire - true or false; defaults to false

A-729
setValue

public void setValue(Object value)

setContext

public void setContext(PropertyController owner,

 java.beans.PropertyDescriptor descriptor)

Sets the owner and the description of the property currently being edited by this editor.

Parameters:

owner - the PropertyController that owns the property being edited by this editor. This may be null.

descriptor - a PropertyDescriptor describing the property being edited by this editor.

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)

A-730
com.cafean.client.ui.beans

Interface PropertyController

public interface PropertyController

extends 

An interface describing an object that has methods to determine if one of its properties is enabled or disabled, and optional or required

at the current moment. 

This interface is used extensively in the Properties View to limit the properties displayed to those actually needed by the analyst.

All Known Implementing Classes:

Annotation, SnapPreferences, UserDefinedConstant, UserDefinedVariable, ViewComponent

Field Summary

public static final ALL

the group containing all propertied, be they disabled required or optional.

Value: 7

public static final COLOR_OPTIONAL

the foreground color for optional properties

public static final DISABLED

the group containing only disabled properties.

Value: 4

public static final NONE

the group containing no properties.

Value: 0

public static final OPTIONAL

the group containing only optional properties.

Value: 2

public static final REQUIRED

the group containing only required properties.

Value: 1

Method Summary

int getAttributeIndex(String propertyName)

Returns a relative index that can be used to order property lists.

boolean isPropertyActive(String propertyName)

Returns false if this object has a property with the given name that is considered inactive;

otherwise true.

A-731
boolean isPropertyEnabled(String propertyName)

Returns false if this object has a property with the given name that has dependency code that

fails;true otherwise

boolean isPropertyRequired(String propertyName)

Returns false if this object has a property with the given name that has requirement code that

fails; true otherwise.

boolean isPropertyResizable(String propertyName)

Returns false if this object has an array property with the given name that should not normally

be resizable.

boolean isPropertyRestartEditable(String propertyName)

Returns true if this object has a property with the given name that should be editable during a

restart edit; false otherwise.

boolean isRestartResizable(String propertyName)

Returns false if this object has an array property with the given name that should not be

resizable while editing a restart.

Fields

COLOR_OPTIONAL

public static final java.awt.Color COLOR_OPTIONAL

the foreground color for optional properties

NONE

public static final int NONE

the group containing no properties.

Constant value: 0

REQUIRED

public static final int REQUIRED

the group containing only required properties.

Constant value: 1

OPTIONAL

public static final int OPTIONAL

the group containing only optional properties.

Constant value: 2

DISABLED

public static final int DISABLED

A-732
the group containing only disabled properties.

Constant value: 4

ALL

public static final int ALL

the group containing all propertied, be they disabled required or optional.

Constant value: 7

Methods

isPropertyEnabled

public boolean isPropertyEnabled(String propertyName)

Returns false if this object has a property with the given name that has dependency code that fails;true otherwise

Parameters:

propertyName - a String containing the property name to check

isPropertyRequired

public boolean isPropertyRequired(String propertyName)

Returns false if this object has a property with the given name that has requirement code that fails; true otherwise.

Parameters:

propertyName - a String containing the property name to check

isPropertyRestartEditable

public boolean isPropertyRestartEditable(String propertyName)

Returns true if this object has a property with the given name that should be editable during a restart edit; false otherwise.

Parameters:

propertyName - a String containing the property name to check

isPropertyActive

public boolean isPropertyActive(String propertyName)

Returns false if this object has a property with the given name that is considered inactive; otherwise true.

A property's active state is separate from its enabled state to allow for a namelist-like property that is actually a boolean paired

with a property of another type.

Parameters:

propertyName - a String containing the name of the property to check

Returns:

false if the property is inactive, true otherwise

See Also:

A-733
NamelistEditor

getAttributeIndex

public int getAttributeIndex(String propertyName)

Returns a relative index that can be used to order property lists.

Parameters:

propertyName - a String containing the property name to check

isPropertyResizable

public boolean isPropertyResizable(String propertyName)

Returns false if this object has an array property with the given name that should not normally be resizable.

Parameters:

propertyName - a String containing the property name to check

isRestartResizable

public boolean isRestartResizable(String propertyName)

Returns false if this object has an array property with the given name that should not be resizable while editing a restart.

Parameters:

propertyName - a String containing the property name to check

A-734
com.cafean.client.ui.beans

Class PropertyEditorPanelSupport

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JPanel

 |

 +-com.cafean.client.ui.beans.PropertyEditorPanelSupport

public abstract class PropertyEditorPanelSupport

extends JPanel

implements javax.accessibility.Accessible, java.io.Serializable, HasGetTransferHandler,

java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.beans.PropertyEditor,

java.awt.event.ActionListener

Abstract Bean property editor containing a JPanel with a label and a button.

All Implemented Interfaces:

java.awt.event.ActionListener, java.beans.PropertyEditor, java.io.Serializable, java.awt.MenuContainer,

java.awt.image.ImageObserver, HasGetTransferHandler, java.io.Serializable, javax.accessibility.Accessible

Direct Known Subclasses:

LimitedLongStringEditor

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Constructor Summary

public PropertyEditorPanelSupport()

Creates new form PropertyEditorPanelSupport

Method Summary

String getAsText()

Gets the property value as a string suitable for presentation to a human to edit.

A-735
java.awt.Component getCustomEditor()

A PropertyEditor may chose to make available a full custom Component that edits its property

value.

String getJavaInitializationString()

This method is intended for use when generating Java code to set the value of the property.

String[] getTags()

If the property value must be one of a set of known tagged values, then this method should

return an array of the tag values.

Object getValue()

Gets the value of the property.

boolean isPaintable()

Determines whether the class will honor the painValue method.

void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box)

Paint a representation of the value into a given area of screen real estate.

void setAsText(String text)

Sets the property value by parsing a given String.

void setFont(java.awt.Font font)

void setForeground(java.awt.Color fg)

void setTextLabelString(String text)

Set the labels text.

void setValue(Object value)

Set (or change) the object that is to be edited.

boolean supportsCustomEditor()

Determines whether the propertyEditor can provide a custom editor.

abstract void updateLabel()

Override this to customize the label text.

void updateValue(Object value)

Non-overriden version of setValue().

Methods inherited from class javax.swing.JPanel

getAccessibleContext, getUI, getUIClassID, setUI, updateUI

Methods inherited from class javax.swing.JComponent

A-736
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-737
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-738
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface java.beans.PropertyEditor

addPropertyChangeListener, getAsText, getCustomEditor, getJavaInitializationString,

getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText,

setValue, supportsCustomEditor

Methods inherited from interface java.awt.event.ActionListener

actionPerformed

Constructors

PropertyEditorPanelSupport

public PropertyEditorPanelSupport()

Creates new form PropertyEditorPanelSupport

Methods

updateLabel

public abstract void updateLabel()

Override this to customize the label text.

setTextLabelString

public void setTextLabelString(String text)

Set the labels text.

Parameters:

text - The text to use.

setForeground

public void setForeground(java.awt.Color fg)

setFont

public void setFont(java.awt.Font font)

A-739
updateValue

public void updateValue(Object value)

Non-overriden version of setValue().

setValue

public void setValue(Object value)

Set (or change) the object that is to be edited.

Parameters:

value - The new target object to be edited. Note that this object should not be modified by the PropertyEditor, rather the

PropertyEditor should create a new object to hold any modified value.

getValue

public Object getValue()

Gets the value of the property.

Returns:

The value of the property.

isPaintable

public boolean isPaintable()

Determines whether the class will honor the painValue method.

Returns:

True if the class will honor the paintValue method.

paintValue

public void paintValue(java.awt.Graphics gfx,

 java.awt.Rectangle box)

Paint a representation of the value into a given area of screen real estate. Note that the propertyEditor is responsible for doing

its own clipping so that it fits into the given rectangle.

If the PropertyEditor doesn't honor paint requests (see isPaintable) this method should be a silent noop.

Parameters:

gfx - Graphics object to paint into.

box - Rectangle within graphics object into which we should paint.

getJavaInitializationString

public String getJavaInitializationString()

A-740
This method is intended for use when generating Java code to set the value of the property. It should return a fragment of Java

code that can be used to initialize a variable with the current property value.

Example results are "2", "new Color(127,127,34)", "Color.orange", etc.

Returns:

A fragment of Java code representing an initializer for the current value.

getAsText

public String getAsText()

Gets the property value as a string suitable for presentation to a human to edit.

Returns:

The property value as a string suitable for presentation to a human to edit.

Returns "null" is the value can't be expressed as a string.

If a non-null value is returned, then the PropertyEditor should be prepared to parse that string back in setAsText().

setAsText

public void setAsText(String text)

 throws IllegalArgumentException

Sets the property value by parsing a given String. May raise java.lang.IllegalArgumentException if either the String is badly

formatted or if this kind of property can't be expressed as text.

Parameters:

text - The string to be parsed.

getTags

public String[] getTags()

If the property value must be one of a set of known tagged values, then this method should return an array of the tag values.

This can be used to represent (for example) enum values. If a PropertyEditor supports tags, then it should support the use of

setAsText with a tag value as a way of setting the value.

Returns:

The tag values for this property. May be null if this property cannot be represented as a tagged value.

getCustomEditor

public java.awt.Component getCustomEditor()

A PropertyEditor may chose to make available a full custom Component that edits its property value. It is the responsibility of

the PropertyEditor to hook itself up to its editor Component itself and to report property value changes by firing a

PropertyChange event.

The higher-level code that calls getCustomEditor may either embed the Component in some larger property sheet, or it may put

it in its own individual dialog, or ...

Returns:

A java.awt.Component that will allow a human to directly edit the current property value. May be null if this is not

supported.

A-741
supportsCustomEditor

public boolean supportsCustomEditor()

Determines whether the propertyEditor can provide a custom editor.

Returns:

True if the propertyEditor can provide a custom editor.

A-742
com.cafean.client.ui.beans

Class RealArrayEditor

java.lang.Object

 |

 +-java.beans.PropertyEditorSupport

 |

 +-com.cafean.client.ui.beans.RealArrayEditor

public class RealArrayEditor

extends java.beans.PropertyEditorSupport

implements java.beans.PropertyEditor, IntrospectingEditor, ModelDependent

This bean editor contains a label and a button for editing an array of Real values. This can be either an array of fixed size, or an array

that can be redimensioned. The button lanuches a RealArrayDialog that actually performs the editing.

All Implemented Interfaces:

ModelDependent, IntrospectingEditor, java.beans.PropertyEditor

Constructor Summary

public RealArrayEditor(boolean fixedDimension, int dimension)

This creates a new instance of RealArrayEditor that has a fixed dimension

public RealArrayEditor()

Creates a new instance of RealArrayEditor, and creates the action listener on the button.

Method Summary

void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

String getAsText()

java.awt.Component getCustomEditor()

String getJavaInitializationString()

Does nothing, and returns null.

AbstractModel getModel()

String[] getTags()

Does nothing, and returns null.

Object getValue()

void init(java.beans.PropertyDescriptor descriptor)

boolean isPaintable()

A-743
void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box)

void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

void setAsText(String text)

void setDimension(int dimension)

Sets the dimension on a given array.

void setModel(AbstractModel model)

void setValue(Object value)

If this array is of fixed width.

boolean supportsCustomEditor()

Methods inherited from class java.beans.PropertyEditorSupport

addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor,

getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue,

removePropertyChangeListener, setAsText, setSource, setValue, supportsCustomEditor

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.beans.PropertyEditor

addPropertyChangeListener, getAsText, getCustomEditor, getJavaInitializationString,

getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText,

setValue, supportsCustomEditor

Methods inherited from interface com.cafean.client.ui.beans.IntrospectingEditor

init

Methods inherited from interface java.beans.PropertyEditor

addPropertyChangeListener, getAsText, getCustomEditor, getJavaInitializationString,

getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText,

setValue, supportsCustomEditor

Methods inherited from interface com.cafean.client.analysis.ModelDependent

getModel, setModel

Constructors

A-744
RealArrayEditor

public RealArrayEditor(boolean fixedDimension,

 int dimension)

This creates a new instance of RealArrayEditor that has a fixed dimension

RealArrayEditor

public RealArrayEditor()

Creates a new instance of RealArrayEditor, and creates the action listener on the button.

Methods

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

getAsText

public String getAsText()

getCustomEditor

public java.awt.Component getCustomEditor()

getJavaInitializationString

public String getJavaInitializationString()

Does nothing, and returns null.

getTags

public String[] getTags()

Does nothing, and returns null.

getValue

public Object getValue()

A-745
isPaintable

public boolean isPaintable()

paintValue

public void paintValue(java.awt.Graphics gfx,

 java.awt.Rectangle box)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

setAsText

public void setAsText(String text)

 throws IllegalArgumentException

init

public void init(java.beans.PropertyDescriptor descriptor)

setValue

public void setValue(Object value)

If this array is of fixed width. This will adjust the passed value to fit the given dimension.

supportsCustomEditor

public boolean supportsCustomEditor()

setDimension

public void setDimension(int dimension)

Sets the dimension on a given array. This also sets the editor to be fixed dimensioned, and resizes the array to match the new

dimension.

getModel

public AbstractModel getModel()

A-746
setModel

public void setModel(AbstractModel model)

A-747
com.cafean.client.ui.beans

Class RealBeanEditor

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JPanel

 |

 +-com.cafean.client.ui.beans.RealBeanEditor

public class RealBeanEditor

extends JPanel

implements javax.accessibility.Accessible, java.io.Serializable, HasGetTransferHandler,

java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, IntrospectingEditor,

ModelDependent

A PropertyEditor wrapper for a RealTextField used when editing a property of type Real of a JavaBean.

All Implemented Interfaces:

ModelDependent, IntrospectingEditor, java.io.Serializable, java.awt.MenuContainer, java.awt.image.ImageObserver,

HasGetTransferHandler, java.io.Serializable, javax.accessibility.Accessible

Direct Known Subclasses:

NamelistRealEditor

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Constructor Summary

public RealBeanEditor()

Creates new form RealBeanEditor

Method Summary

void firePropertyChange()

Report that we have been modified to any interested listeners.

A-748
String getAsText()

java.awt.Component getCustomEditor()

String getJavaInitializationString()

AbstractModel getModel()

String[] getTags()

Object getValue()

void init(java.beans.PropertyDescriptor descriptor)

boolean isPaintable()

void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box)

void setAsText(String text)

void setForeground(java.awt.Color fg)

void setModel(AbstractModel model)

void setValue(Object value)

boolean supportsCustomEditor()

Methods inherited from class javax.swing.JPanel

getAccessibleContext, getUI, getUIClassID, setUI, updateUI

Methods inherited from class javax.swing.JComponent

A-749
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-750
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-751
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Methods inherited from interface com.cafean.client.ui.beans.IntrospectingEditor

init

Methods inherited from interface java.beans.PropertyEditor

addPropertyChangeListener, getAsText, getCustomEditor, getJavaInitializationString,

getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText,

setValue, supportsCustomEditor

Methods inherited from interface com.cafean.client.analysis.ModelDependent

getModel, setModel

Constructors

RealBeanEditor

public RealBeanEditor()

Creates new form RealBeanEditor

Methods

setForeground

public void setForeground(java.awt.Color fg)

getAsText

public String getAsText()

setAsText

public void setAsText(String text)

 throws IllegalArgumentException

A-752
init

public void init(java.beans.PropertyDescriptor descriptor)

getValue

public Object getValue()

setValue

public void setValue(Object value)

isPaintable

public boolean isPaintable()

getJavaInitializationString

public String getJavaInitializationString()

getTags

public String[] getTags()

paintValue

public void paintValue(java.awt.Graphics gfx,

 java.awt.Rectangle box)

getCustomEditor

public java.awt.Component getCustomEditor()

supportsCustomEditor

public boolean supportsCustomEditor()

A-753
firePropertyChange

public void firePropertyChange()

Report that we have been modified to any interested listeners.

getModel

public AbstractModel getModel()

setModel

public void setModel(AbstractModel model)

A-754
Package

com.cafean.client.ui.tools

A-755
com.cafean.client.ui.tools

Class AnnotationAction

java.lang.Object

 |

 +-javax.swing.AbstractAction

 |

 +-com.cafean.client.ui.tools.ToolboxAction

 |

 +-com.cafean.client.ui.tools.AnnotationAction

public abstract class AnnotationAction

extends ToolboxAction

A ToolboxAction derivative used to create various Annotations.

All Implemented Interfaces:

java.io.Serializable, Cloneable, Action

Fields inherited from interface javax.swing.Action

ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY,

LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON

Constructor Summary

public AnnotationAction(Toolbox toolbox, String name, Icon icon, String

description)

Creates a new action for the given toolbox.

Method Summary

abstract JComponent createComponent()

Creates a new instance of this action's Annotation type.

Methods inherited from class com.cafean.client.ui.tools.ToolboxAction

actionPerformed, getDescription, getIcon, getName

Methods inherited from class javax.swing.AbstractAction

addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, isEnabled,

putValue, removePropertyChangeListener, setEnabled

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface javax.swing.Action

A-756
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener,

setEnabled

Methods inherited from interface java.awt.event.ActionListener

actionPerformed

Constructors

AnnotationAction

public AnnotationAction(Toolbox toolbox,

 String name,

 Icon icon,

 String description)

Creates a new action for the given toolbox.

Parameters:

toolbox - the Toolbox that is using this action

name - a String containing the display name of this action

description - a String containing a description of this action suitable for use as a tooltip for a menu item or button.

Methods

createComponent

public abstract JComponent createComponent()

Creates a new instance of this action's Annotation type.

A-757
com.cafean.client.ui.tools

Class BeanAction

java.lang.Object

 |

 +-javax.swing.AbstractAction

 |

 +-com.cafean.client.ui.tools.ToolboxAction

 |

 +-com.cafean.client.ui.tools.BeanAction

public class BeanAction

extends ToolboxAction

A ToolboxAction derivative used to create any kind of bean. The bean's BeanInfo is used to determine its name, icon and description.

All Implemented Interfaces:

java.io.Serializable, Cloneable, Action

Fields inherited from interface javax.swing.Action

ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY,

LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON

Constructor Summary

public BeanAction(Toolbox toolbox, Class beanClass)

Creates a new action for creating the given bean.

Method Summary

JComponent createComponent()

Creates a new instance of the bean this action represents.

Methods inherited from class com.cafean.client.ui.tools.ToolboxAction

actionPerformed, getDescription, getIcon, getName

Methods inherited from class javax.swing.AbstractAction

addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, isEnabled,

putValue, removePropertyChangeListener, setEnabled

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface javax.swing.Action

addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener,

setEnabled

A-758
Methods inherited from interface java.awt.event.ActionListener

actionPerformed

Constructors

BeanAction

public BeanAction(Toolbox toolbox,

 Class beanClass)

Creates a new action for creating the given bean.

Parameters:

beanClass - the Class of the bean to be created by this action

Methods

createComponent

public JComponent createComponent()

Creates a new instance of the bean this action represents.

A-759
com.cafean.client.ui.tools

Class CategoryAction

java.lang.Object

 |

 +-javax.swing.AbstractAction

 |

 +-com.cafean.client.ui.tools.ToolboxAction

 |

 +-com.cafean.client.ui.tools.CategoryAction

public class CategoryAction

extends ToolboxAction

A ToolboxAction derivative used to create AbstractComponent instances from a Category.

All Implemented Interfaces:

java.io.Serializable, Cloneable, Action

Fields inherited from interface javax.swing.Action

ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY,

LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON

Constructor Summary

public CategoryAction(Toolbox toolbox, Category category)

creates a new CategoryAction for the given toolbox with the given Category

Method Summary

Category getCategory()

Retrieves the Category of component that this action will be used to create.

Methods inherited from class com.cafean.client.ui.tools.ToolboxAction

actionPerformed, getDescription, getIcon, getName

Methods inherited from class javax.swing.AbstractAction

addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, isEnabled,

putValue, removePropertyChangeListener, setEnabled

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface javax.swing.Action

addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener,

setEnabled

A-760
Methods inherited from interface java.awt.event.ActionListener

actionPerformed

Constructors

CategoryAction

public CategoryAction(Toolbox toolbox,

 Category category)

creates a new CategoryAction for the given toolbox with the given Category

Methods

getCategory

public Category getCategory()

Retrieves the Category of component that this action will be used to create.

A-761
com.cafean.client.ui.tools

Class ConnectMouseHandler

java.lang.Object

 |

 +-com.cafean.client.ui.tools.MouseHandler

 |

 +-com.cafean.client.ui.tools.ConnectMouseHandler

public class ConnectMouseHandler

extends MouseHandler

A MouseHandler for Connection events on the ZoomablePanel

All Implemented Interfaces:

java.awt.event.MouseMotionListener, java.awt.event.MouseListener

Field Summary

public static final CURSOR_CONNECT

The cursor for the connect tool

public static final CURSOR_CONNECT_COMPLETE

The cursor for the connect tool when connection completion is possible

public static final CURSOR_CONNECT_OFF

The cursor for the connect tool when no connection is possible

Constructor Summary

public ConnectMouseHandler(ZoomablePanel parent)

Creates a new mouse handler with the given parent

Method Summary

void activate()

Sets up this MouseHandler to be ready to recieve MouseEvents

void completeConnection(DrawnComponent targetDrawing, ConnectingPt point)

Completes the current connection.

void deactivate()

Deactivates this MouseHandler and cleans up any current operations.

ImageIcon getButtonIcon()

Returns the icon for use in creating an activation toolbar button for this handler.

AbstractComponent getConnectionSource()

Returns the AbstractComponent that started the connection.

A-762
java.awt.Cursor getCurrentCursor(java.awt.event.MouseEvent evt)

Retrieves the cursor for the views based off of the currently selected tool.

java.awt.Cursor getCursor(java.awt.event.MouseEvent evt)

Retrieves the cursor for this MouseHandler within the context of the given MouseEvent

String getTooltipText()

returns the tooptip text to use for this MouseHandler's toggle button or null of no text is

desired.

boolean isInProgress()

Returns true if a connection draw is in progress.

void mouseClicked(java.awt.event.MouseEvent orig_evt)

When inactive, mouse events are forwarded as appropriate either to the UI to activate the frame

or to the underlying child component.

void mouseDragged(java.awt.event.MouseEvent orig_evt)

void mouseMoved(java.awt.event.MouseEvent orig_evt)

void mousePressed(java.awt.event.MouseEvent orig_evt)

When inactive, mouse events are forwarded as appropriate either to the UI to activate the frame

or to the underlying child component.

void mouseReleased(java.awt.event.MouseEvent orig_evt)

boolean requiresTarget()

Determines if the ConnectingPt that started this connection requires a connection point for its

target.

void setConnectionStart(java.awt.Point start, DrawnComponent comp,

ConnectingPt point)

String toString()

returns a string representation of this handler

Methods inherited from class com.cafean.client.ui.tools.MouseHandler

activate, deactivate, getButtonIcon, getCurrentCursor, getCursor, getHandlerID,

getTooltipText, mouseClicked, mouseEntered, mouseExited, mouseMoved, setHandlerID,

toString

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.event.MouseListener

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased

Methods inherited from interface java.awt.event.MouseMotionListener

mouseDragged, mouseMoved

A-763
Fields

CURSOR_CONNECT

public static final java.awt.Cursor CURSOR_CONNECT

The cursor for the connect tool

CURSOR_CONNECT_OFF

public static final java.awt.Cursor CURSOR_CONNECT_OFF

The cursor for the connect tool when no connection is possible

CURSOR_CONNECT_COMPLETE

public static final java.awt.Cursor CURSOR_CONNECT_COMPLETE

The cursor for the connect tool when connection completion is possible

Constructors

ConnectMouseHandler

public ConnectMouseHandler(ZoomablePanel parent)

Creates a new mouse handler with the given parent

Methods

getButtonIcon

public ImageIcon getButtonIcon()

Returns the icon for use in creating an activation toolbar button for this handler. The returned icon need not be cached as this

method will only be called once per instance.

Returns:

the javax.swing.ImageIcon to be used as this handler's toggle button icon.

toString

public String toString()

returns a string representation of this handler

getTooltipText

public String getTooltipText()

returns the tooptip text to use for this MouseHandler's toggle button or null of no text is desired.

A-764
activate

public void activate()

Sets up this MouseHandler to be ready to recieve MouseEvents

deactivate

public void deactivate()

Deactivates this MouseHandler and cleans up any current operations.

isInProgress

public boolean isInProgress()

Returns true if a connection draw is in progress.

getCurrentCursor

public java.awt.Cursor getCurrentCursor(java.awt.event.MouseEvent evt)

Retrieves the cursor for the views based off of the currently selected tool.

getCursor

public java.awt.Cursor getCursor(java.awt.event.MouseEvent evt)

Retrieves the cursor for this MouseHandler within the context of the given MouseEvent

mousePressed

public void mousePressed(java.awt.event.MouseEvent orig_evt)

When inactive, mouse events are forwarded as appropriate either to the UI to activate the frame or to the underlying child

component.

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent orig_evt)

When inactive, mouse events are forwarded as appropriate either to the UI to activate the frame or to the underlying child

component.

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent orig_evt)

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent orig_evt)

A-765
Forward the mouseMoved event to the underlying child container. Change the cursor as it moves over selected components.

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent orig_evt)

setConnectionStart

public void setConnectionStart(java.awt.Point start,

 DrawnComponent comp,

 ConnectingPt point)

completeConnection

public void completeConnection(DrawnComponent targetDrawing,

 ConnectingPt point)

Completes the current connection.

Parameters:

targetDrawing - the DrawnComponent to connect to the component of

point - the ConnectingPt the connection ended on

See Also:

setConnectionStart(Point, DrawnComponent, ConnectingPt)

requiresTarget

public boolean requiresTarget()

Determines if the ConnectingPt that started this connection requires a connection point for its target.

getConnectionSource

public AbstractComponent getConnectionSource()

Returns the AbstractComponent that started the connection.

A-766
com.cafean.client.ui.tools

Class InsertMouseHandler

java.lang.Object

 |

 +-com.cafean.client.ui.tools.MouseHandler

 |

 +-com.cafean.client.ui.tools.InsertMouseHandler

public class InsertMouseHandler

extends MouseHandler

The Insert Tool, a MouseHandler for insertion into a ZoomablePanel. Handles the creation and insertion of new components and the

management of AbstractInsertHandler instances used to create and dimension various Insertable components.

All Implemented Interfaces:

java.awt.event.MouseMotionListener, java.awt.event.MouseListener

See Also:

Insertable, AbstractInsertHandler

Constructor Summary

public InsertMouseHandler(ZoomablePanel parent)

Creates a new mouse handler with the given parent

Method Summary

void cancelInsert()

Cancels the current insertion

void finishInsert(java.awt.event.MouseEvent orig_evt)

Completes the current insertion by adding the component and initializing it.

java.awt.Cursor getCurrentCursor(java.awt.event.MouseEvent evt)

Retrieves the cursor for the views based off of the currently selected tool.

void mouseClicked(java.awt.event.MouseEvent orig_evt)

Handles mouse clicked events by inserting a new component.

void mouseDragged(java.awt.event.MouseEvent orig_evt)

Forwards mouseDragged events to the child AbstractInsertHandler, if one is currently in use.

void mouseMoved(java.awt.event.MouseEvent orig_evt)

Forwards mouseMoved events to the child AbstractInsertHandler, if one is currently in use.

void mousePressed(java.awt.event.MouseEvent orig_evt)

the mouse pressed event is not handled by this tool but is instead forwarded.

void mouseReleased(java.awt.event.MouseEvent orig_evt)

Forwards mouseReleased events to the child AbstractInsertHandler, if one is currently in use,

otherwise events are forwarded via MouseHandler.forwardMouseEvent(MouseEvent).

A-767
Methods inherited from class com.cafean.client.ui.tools.MouseHandler

activate, deactivate, getButtonIcon, getCurrentCursor, getCursor, getHandlerID,

getTooltipText, mouseClicked, mouseEntered, mouseExited, mouseMoved, setHandlerID,

toString

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.event.MouseListener

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased

Methods inherited from interface java.awt.event.MouseMotionListener

mouseDragged, mouseMoved

Constructors

InsertMouseHandler

public InsertMouseHandler(ZoomablePanel parent)

Creates a new mouse handler with the given parent

Methods

getCurrentCursor

public java.awt.Cursor getCurrentCursor(java.awt.event.MouseEvent evt)

Retrieves the cursor for the views based off of the currently selected tool.

mousePressed

public void mousePressed(java.awt.event.MouseEvent orig_evt)

the mouse pressed event is not handled by this tool but is instead forwarded.

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent orig_evt)

Forwards mouseMoved events to the child AbstractInsertHandler, if one is currently in use.

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent orig_evt)

Forwards mouseDragged events to the child AbstractInsertHandler, if one is currently in use.

A-768
mouseReleased

public void mouseReleased(java.awt.event.MouseEvent orig_evt)

Forwards mouseReleased events to the child AbstractInsertHandler, if one is currently in use, otherwise events are forwarded

via MouseHandler.forwardMouseEvent(MouseEvent).

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent orig_evt)

Handles mouse clicked events by inserting a new component. If a child AbstractInsertHandler is in use, this event is forwarded

to it instead of being handled here.

See Also:

mousePressed(MouseEvent)

finishInsert

public void finishInsert(java.awt.event.MouseEvent orig_evt)

Completes the current insertion by adding the component and initializing it.

cancelInsert

public void cancelInsert()

Cancels the current insertion

A-769
com.cafean.client.ui.tools

Class InteractiveMouseHandler

java.lang.Object

 |

 +-com.cafean.client.ui.tools.MouseHandler

 |

 +-com.cafean.client.ui.tools.InteractiveMouseHandler

public class InteractiveMouseHandler

extends MouseHandler

A MouseHandler for interactive handling of events on the ZoomablePanel

All Implemented Interfaces:

java.awt.event.MouseMotionListener, java.awt.event.MouseListener

Constructor Summary

public InteractiveMouseHandler(ZoomablePanel parent)

Creates a new mouse handler with the given parent

Method Summary

void activate()

ImageIcon getButtonIcon()

Returns the icon for use in creating an activation toolbar button for this handler.

String getTooltipText()

returns the tooptip text to use for this MouseHandler's toggle button or null of no text is

desired.

void mouseDragged(java.awt.event.MouseEvent orig_evt)

void mousePressed(java.awt.event.MouseEvent orig_evt)

void mouseReleased(java.awt.event.MouseEvent orig_evt)

Methods inherited from class com.cafean.client.ui.tools.MouseHandler

activate, deactivate, getButtonIcon, getCurrentCursor, getCursor, getHandlerID,

getTooltipText, mouseClicked, mouseEntered, mouseExited, mouseMoved, setHandlerID,

toString

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

A-770
Methods inherited from interface java.awt.event.MouseListener

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased

Methods inherited from interface java.awt.event.MouseMotionListener

mouseDragged, mouseMoved

Constructors

InteractiveMouseHandler

public InteractiveMouseHandler(ZoomablePanel parent)

Creates a new mouse handler with the given parent

Methods

activate

public void activate()

Sets up this MouseHandler to be ready to recieve MouseEvents

getButtonIcon

public ImageIcon getButtonIcon()

Returns the icon for use in creating an activation toolbar button for this handler. The returned icon need not be cached as this

method will only be called once per instance.

Returns:

the javax.swing.ImageIcon to be used as this handler's toggle button icon.

getTooltipText

public String getTooltipText()

returns the tooptip text to use for this MouseHandler's toggle button or null of no text is desired.

mousePressed

public void mousePressed(java.awt.event.MouseEvent orig_evt)

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent orig_evt)

A-771
mouseReleased

public void mouseReleased(java.awt.event.MouseEvent orig_evt)

A-772
com.cafean.client.ui.tools

Class MouseHandler

java.lang.Object

 |

 +-com.cafean.client.ui.tools.MouseHandler

public abstract class MouseHandler

extends Object

implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener

The base class for the MouseListeners/MouseMotionListeners in a DrawnView that correspond directly to the "Tool" buttons (select,

pan, zoom, etc.) 

These tools all have a unique ID that in many places to determine the proper path for event dispatching. This ID is allocated and

managed automatically by ZoomablePanel's addMouseHandler method and should not be altered.

This base class provides a key handler to disable this handler and switch to the select handler. To preserve this behavior ensure that the

MouseHandler methods activate() and deactivate() are called when overridden. Further customization of this cancelling behavior can

be achieved by overriding escapePressed() and performing additional operations before calling the base implementation.

Extensions of this class should override the necessary MouseListener and MouseMotionListener methods to achive the desired mouse

feedback.

All Implemented Interfaces:

java.awt.event.MouseMotionListener, java.awt.event.MouseListener

Direct Known Subclasses:

SelectMouseHandler, ZoomMouseHandler, InsertMouseHandler, InteractiveMouseHandler, PanMouseHandler,

ConnectMouseHandler

See Also:

ZoomablePanel.addMouseHandler(MouseHandler), ZoomablePanel.removeMouseHandler(MouseHandler)

Constructor Summary

public MouseHandler(ZoomablePanel parent)

Creates a new instance of MouseHandler

Method Summary

void activate()

Sets up this MouseHandler to be ready to recieve MouseEvents

void deactivate()

Deactivates this MouseHandler and cleans up any current operations.

ImageIcon getButtonIcon()

Returns the icon for use in creating an activation toolbar button for this handler.

java.awt.Cursor getCurrentCursor(java.awt.event.MouseEvent evt)

Retrieves the cursor for the views based off of the currently selected tool.

A-773
java.awt.Cursor getCursor(java.awt.event.MouseEvent evt)

Retrieves the cursor for this MouseHandler within the context of the given MouseEvent.

int getHandlerID()

Gets this handler's ID.

String getTooltipText()

returns the tooptip text to use for this MouseHandler's toggle button or null of no text is

desired.

void mouseClicked(java.awt.event.MouseEvent orig_evt)

Forward the mouseClicked event to the underlying child container.

void mouseEntered(java.awt.event.MouseEvent orig_evt)

Forward the mouseEntered event to the underlying child container.

void mouseExited(java.awt.event.MouseEvent orig_evt)

Forward the mouseExited event to the underlying child container.

void mouseMoved(java.awt.event.MouseEvent orig_evt)

Forward the mouseMoved event to the underlying child container.

void setHandlerID(int id)

Sets this handler's ID.

String toString()

returns a string representation of this handler including its class name and handler id.

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.event.MouseListener

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased

Methods inherited from interface java.awt.event.MouseMotionListener

mouseDragged, mouseMoved

Constructors

MouseHandler

public MouseHandler(ZoomablePanel parent)

Creates a new instance of MouseHandler

Methods

A-774
activate

public void activate()

Sets up this MouseHandler to be ready to recieve MouseEvents

deactivate

public void deactivate()

Deactivates this MouseHandler and cleans up any current operations.

getCurrentCursor

public java.awt.Cursor getCurrentCursor(java.awt.event.MouseEvent evt)

Retrieves the cursor for the views based off of the currently selected tool.

getCursor

public java.awt.Cursor getCursor(java.awt.event.MouseEvent evt)

Retrieves the cursor for this MouseHandler within the context of the given MouseEvent.

Parameters:

evt - the MouseEvent corresponding to the current Cursor change. May be null!

getButtonIcon

public ImageIcon getButtonIcon()

Returns the icon for use in creating an activation toolbar button for this handler. The returned icon need not be cached as this

method will only be called once per instance. The default implementation simply returns null.

Returns:

the javax.swing.ImageIcon to be used as this handler's toggle button icon.

setHandlerID

public final void setHandlerID(int id)

Sets this handler's ID. This ID is generated at view creation time by ZoomablePanel and should not be stored, cached or

changed.

getHandlerID

public final int getHandlerID()

Gets this handler's ID. This ID is generated at view creation time by ZoomablePanel and should not be stored, cached or

changed.

A-775
mouseClicked

public void mouseClicked(java.awt.event.MouseEvent orig_evt)

Forward the mouseClicked event to the underlying child container.

See Also:

MouseListener.mousePressed(java.awt.event.MouseEvent)

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent orig_evt)

Forward the mouseEntered event to the underlying child container.

See Also:

MouseListener.mousePressed(java.awt.event.MouseEvent)

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent orig_evt)

Forward the mouseMoved event to the underlying child container. Change the cursor as it moves over selected components.

See Also:

MouseListener.mousePressed(java.awt.event.MouseEvent)

mouseExited

public void mouseExited(java.awt.event.MouseEvent orig_evt)

Forward the mouseExited event to the underlying child container.

See Also:

MouseListener.mousePressed(java.awt.event.MouseEvent)

toString

public String toString()

returns a string representation of this handler including its class name and handler id.

getTooltipText

public String getTooltipText()

returns the tooptip text to use for this MouseHandler's toggle button or null of no text is desired.

A-776
com.cafean.client.ui.tools

Class PanMouseHandler

java.lang.Object

 |

 +-com.cafean.client.ui.tools.MouseHandler

 |

 +-com.cafean.client.ui.tools.PanMouseHandler

public class PanMouseHandler

extends MouseHandler

A MouseHandler for Pan events on the ZoomablePanel

All Implemented Interfaces:

java.awt.event.MouseMotionListener, java.awt.event.MouseListener

Field Summary

public static final CURSOR_PAN

The cursor for the pan tool, when a mouse button is not being pressed

public static final CURSOR_PAN_GRIP

The cursor for the pan tool, while a mouse button is being pressed

Constructor Summary

public PanMouseHandler(ZoomablePanel parent)

Creates a new mouse handler with the given parent

Method Summary

ImageIcon getButtonIcon()

Returns the icon for use in creating an activation toolbar button for this handler.

java.awt.Cursor getCurrentCursor(java.awt.event.MouseEvent evt)

Retrieves the cursor for the views based off of the currently selected tool.

String getTooltipText()

returns the tooptip text to use for this MouseHandler's toggle button or null of no text is

desired.

void mouseClicked(java.awt.event.MouseEvent orig_evt)

void mouseDragged(java.awt.event.MouseEvent orig_evt)

Handle mouseDragged events for move and resize operations.

void mousePressed(java.awt.event.MouseEvent orig_evt)

When inactive, mouse events are forwarded as appropriate either to the UI to activate the frame

or to the underlying child component.

A-777
void mouseReleased(java.awt.event.MouseEvent orig_evt)

String toString()

returns a string representation of this handler

Methods inherited from class com.cafean.client.ui.tools.MouseHandler

activate, deactivate, getButtonIcon, getCurrentCursor, getCursor, getHandlerID,

getTooltipText, mouseClicked, mouseEntered, mouseExited, mouseMoved, setHandlerID,

toString

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.event.MouseListener

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased

Methods inherited from interface java.awt.event.MouseMotionListener

mouseDragged, mouseMoved

Fields

CURSOR_PAN

public static final java.awt.Cursor CURSOR_PAN

The cursor for the pan tool, when a mouse button is not being pressed

CURSOR_PAN_GRIP

public static final java.awt.Cursor CURSOR_PAN_GRIP

The cursor for the pan tool, while a mouse button is being pressed

Constructors

PanMouseHandler

public PanMouseHandler(ZoomablePanel parent)

Creates a new mouse handler with the given parent

Methods

getButtonIcon

public ImageIcon getButtonIcon()

A-778
Returns the icon for use in creating an activation toolbar button for this handler. The returned icon need not be cached as this

method will only be called once per instance.

Returns:

the javax.swing.ImageIcon to be used as this handler's toggle button icon.

toString

public String toString()

returns a string representation of this handler

getTooltipText

public String getTooltipText()

returns the tooptip text to use for this MouseHandler's toggle button or null of no text is desired.

mousePressed

public void mousePressed(java.awt.event.MouseEvent orig_evt)

When inactive, mouse events are forwarded as appropriate either to the UI to activate the frame or to the underlying child

component.

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent orig_evt)

Handle mouseDragged events for move and resize operations.

See Also:

mousePressed(MouseEvent)

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent orig_evt)

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent orig_evt)

Forward the mouseClicked event to the underlying child container.

getCurrentCursor

public java.awt.Cursor getCurrentCursor(java.awt.event.MouseEvent evt)

Retrieves the cursor for the views based off of the currently selected tool.

A-779
com.cafean.client.ui.tools

Class SelectMouseHandler

java.lang.Object

 |

 +-com.cafean.client.ui.tools.MouseHandler

 |

 +-com.cafean.client.ui.tools.SelectMouseHandler

public class SelectMouseHandler

extends MouseHandler

A MouseHandler for the Select Tool, handling typical movement and resizing manipulation in the ZoomablePanel.

All Implemented Interfaces:

java.awt.event.MouseMotionListener, java.awt.event.MouseListener

Constructor Summary

public SelectMouseHandler(ZoomablePanel parent)

Creates a new mouse handler with the given parent

Method Summary

static boolean canBeResized(java.awt.Component component)

Returns true if the given component can be resized by this handler.

void deactivate()

ImageIcon getButtonIcon()

Returns the icon for use in creating an activation toolbar button for this handler.

java.awt.Cursor getCurrentCursor(java.awt.event.MouseEvent evt)

Retrieves the cursor for the views based off of the currently selected tool.

java.awt.Cursor getCursor(java.awt.event.MouseEvent orig_evt)

String getTooltipText()

returns the tooptip text to use for this MouseHandler's toggle button or null of no text is

desired.

void mouseDragged(java.awt.event.MouseEvent orig_evt)

Handle mouseDragged events for move and resize operations.

void mousePressed(java.awt.event.MouseEvent orig_evt)

When inactive, mouse events are forwarded as appropriate either to the UI to activate the frame

or to the underlying child component.

void mouseReleased(java.awt.event.MouseEvent orig_evt)

Handle mouseReleased events to support move, resize, select operations.

A-780
String toString()

returns a string representation of this handler

Methods inherited from class com.cafean.client.ui.tools.MouseHandler

activate, deactivate, getButtonIcon, getCurrentCursor, getCursor, getHandlerID,

getTooltipText, mouseClicked, mouseEntered, mouseExited, mouseMoved, setHandlerID,

toString

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.event.MouseListener

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased

Methods inherited from interface java.awt.event.MouseMotionListener

mouseDragged, mouseMoved

Constructors

SelectMouseHandler

public SelectMouseHandler(ZoomablePanel parent)

Creates a new mouse handler with the given parent

Methods

deactivate

public void deactivate()

Deactivates this MouseHandler and cleans up any current operations.

getButtonIcon

public ImageIcon getButtonIcon()

Returns the icon for use in creating an activation toolbar button for this handler. The returned icon need not be cached as this

method will only be called once per instance.

Returns:

the javax.swing.ImageIcon to be used as this handler's toggle button icon.

toString

public String toString()

A-781
returns a string representation of this handler

getTooltipText

public String getTooltipText()

returns the tooptip text to use for this MouseHandler's toggle button or null of no text is desired.

mousePressed

public void mousePressed(java.awt.event.MouseEvent orig_evt)

When inactive, mouse events are forwarded as appropriate either to the UI to activate the frame or to the underlying child

component.

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent orig_evt)

Handle mouseDragged events for move and resize operations.

See Also:

mousePressed(MouseEvent)

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent orig_evt)

Handle mouseReleased events to support move, resize, select operations. Forward the mouseExited event to the underlying

child container.

See Also:

mousePressed(MouseEvent)

canBeResized

public static boolean canBeResized(java.awt.Component component)

Returns true if the given component can be resized by this handler.

getCurrentCursor

public java.awt.Cursor getCurrentCursor(java.awt.event.MouseEvent evt)

Retrieves the cursor for the views based off of the currently selected tool.

getCursor

public java.awt.Cursor getCursor(java.awt.event.MouseEvent orig_evt)

Retrieves the cursor for this MouseHandler within the context of the given MouseEvent.

A-782
com.cafean.client.ui.tools

Class ToolboxAction

java.lang.Object

 |

 +-javax.swing.AbstractAction

 |

 +-com.cafean.client.ui.tools.ToolboxAction

public abstract class ToolboxAction

extends AbstractAction

The base class for all Action objects used in the Toolbox to create components, beans, or annotations.

All Implemented Interfaces:

java.io.Serializable, Cloneable, Action

Direct Known Subclasses:

BeanAction, AnnotationAction, CategoryAction

Fields inherited from interface javax.swing.Action

ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY,

LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON

Constructor Summary

public ToolboxAction(Toolbox toolbox, String name, Icon icon, String

description)

Creates a new ToolboxAction with the given toolbox.

Method Summary

void actionPerformed(java.awt.event.ActionEvent e)

Responds to ActionEvents by setting this as the current ToolboxAction in this action's

Toolbox.

String getDescription()

Retrieves this action's description.

Icon getIcon()

Retrieves this action's icon.

String getName()

Retrieves this action's name.

Methods inherited from class javax.swing.AbstractAction

addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, isEnabled,

putValue, removePropertyChangeListener, setEnabled

A-783
Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface javax.swing.Action

addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener,

setEnabled

Methods inherited from interface java.awt.event.ActionListener

actionPerformed

Constructors

ToolboxAction

public ToolboxAction(Toolbox toolbox,

 String name,

 Icon icon,

 String description)

Creates a new ToolboxAction with the given toolbox. The given name, icon and description are passed to the super class via

AbstractAction.putValue(java.lang.String, java.lang.Object).

Parameters:

toolbox - the Toolbox that is using this action

name - a String containing the display name of this action

description - a String containing a description of this action suitable for use as a tooltip for a menu item or button.

Methods

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)

Responds to ActionEvents by setting this as the current ToolboxAction in this action's Toolbox.

getName

public String getName()

Retrieves this action's name.

getDescription

public String getDescription()

Retrieves this action's description.

A-784
getIcon

public Icon getIcon()

Retrieves this action's icon.

A-785
com.cafean.client.ui.tools

Interface ToolChangeListener

public interface ToolChangeListener

extends 

An interface describing a listener for changes in the current tool.

All Known Implementing Classes:

ZoomablePanel

Method Summary

void toolChanged(int oldTool, int newTool)

Notifies this listener that the current tool has changed from the old tool to the new tool.

Methods

toolChanged

public void toolChanged(int oldTool,

 int newTool)

Notifies this listener that the current tool has changed from the old tool to the new tool. Tools are one of the TOOL_*

enumerations in Toolbox.

See Also:

Toolbox

A-786
com.cafean.client.ui.tools

Class ZoomMouseHandler

java.lang.Object

 |

 +-com.cafean.client.ui.tools.MouseHandler

 |

 +-com.cafean.client.ui.tools.ZoomMouseHandler

public class ZoomMouseHandler

extends MouseHandler

A MouseHandler for Zoom events on the ZoomablePanel

All Implemented Interfaces:

java.awt.event.MouseMotionListener, java.awt.event.MouseListener

Field Summary

public static final CURSOR_ZOOM_IN

The cursor for the Zoom Tool

public static final CURSOR_ZOOM_OUT

The cursor for the Zoom Tool

Constructor Summary

public ZoomMouseHandler(ZoomablePanel parent)

Creates a new mouse handler with the given parent

Method Summary

void activate()

void deactivate()

ImageIcon getButtonIcon()

Returns the icon for use in creating an activation toolbar button for this handler.

java.awt.Cursor getCurrentCursor(java.awt.event.MouseEvent evt)

Retrieves the cursor for the views based off of the currently selected tool.

String getTooltipText()

returns the tooptip text to use for this MouseHandler's toggle button or null of no text is

desired.

void mouseDragged(java.awt.event.MouseEvent evt)

Handle mouseDragged events for move and resize operations.

void mousePressed(java.awt.event.MouseEvent orig_evt)

A-787
void mouseReleased(java.awt.event.MouseEvent orig_evt)

Handle mouseReleased events to support move, resize, select operations.

String toString()

returns a string representation of this handler

Methods inherited from class com.cafean.client.ui.tools.MouseHandler

activate, deactivate, getButtonIcon, getCurrentCursor, getCursor, getHandlerID,

getTooltipText, mouseClicked, mouseEntered, mouseExited, mouseMoved, setHandlerID,

toString

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.event.MouseListener

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased

Methods inherited from interface java.awt.event.MouseMotionListener

mouseDragged, mouseMoved

Fields

CURSOR_ZOOM_IN

public static final java.awt.Cursor CURSOR_ZOOM_IN

The cursor for the Zoom Tool

CURSOR_ZOOM_OUT

public static final java.awt.Cursor CURSOR_ZOOM_OUT

The cursor for the Zoom Tool

Constructors

ZoomMouseHandler

public ZoomMouseHandler(ZoomablePanel parent)

Creates a new mouse handler with the given parent

Methods

getCurrentCursor

public java.awt.Cursor getCurrentCursor(java.awt.event.MouseEvent evt)

A-788
Retrieves the cursor for the views based off of the currently selected tool.

getButtonIcon

public ImageIcon getButtonIcon()

Returns the icon for use in creating an activation toolbar button for this handler. The returned icon need not be cached as this

method will only be called once per instance.

Returns:

the javax.swing.ImageIcon to be used as this handler's toggle button icon.

toString

public String toString()

returns a string representation of this handler

getTooltipText

public String getTooltipText()

returns the tooptip text to use for this MouseHandler's toggle button or null of no text is desired.

activate

public void activate()

Sets up this MouseHandler to be ready to recieve MouseEvents

deactivate

public void deactivate()

Deactivates this MouseHandler and cleans up any current operations.

mousePressed

public void mousePressed(java.awt.event.MouseEvent orig_evt)

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent evt)

Handle mouseDragged events for move and resize operations.

See Also:

mousePressed(MouseEvent)

A-789
mouseReleased

public void mouseReleased(java.awt.event.MouseEvent orig_evt)

Handle mouseReleased events to support move, resize, select operations. Forward the mouseExited event to the underlying

child container.

See Also:

mousePressed(MouseEvent)

A-790
Package

com.cafean.client.ui.tools.insert

A-791
com.cafean.client.ui.tools.insert

Class AbstractInsertHandler

java.lang.Object

 |

 +-com.cafean.client.ui.tools.insert.AbstractInsertHandler

public abstract class AbstractInsertHandler

extends Object

implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener

The base class of a mouse handler used to control the insertion of a bean, annotation, etc.

All Implemented Interfaces:

java.awt.event.MouseMotionListener, java.awt.event.MouseListener

Direct Known Subclasses:

RectangularInsertHandler, AbstractPathHandler

Constructor Summary

public AbstractInsertHandler(ZoomablePanel parent)

Creates a new instance of MouseHandler

Method Summary

void cancelInsert()

Cancels the insertion by calling InsertMouseHandler.finishInsert(MouseEvent).

void finishInsert(java.awt.event.MouseEvent orig_evt)

Completes the insertion by calling InsertMouseHandler.finishInsert(MouseEvent).

java.awt.Cursor getCurrentCursor()

Retrieves the cursor for the views based off of the currently selected tool.

void mouseClicked(java.awt.event.MouseEvent orig_evt)

This handler ignores mouse clicked events

void mouseEntered(java.awt.event.MouseEvent orig_evt)

sets the zoomable panel's cursor to the handler's current cursor

void mouseExited(java.awt.event.MouseEvent orig_evt)

sets the zoomable panel's cursor to the handler's current cursor

void mouseMoved(java.awt.event.MouseEvent orig_evt)

sets the zoomable panel's cursor to the handler's current cursor

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

A-792
Methods inherited from interface java.awt.event.MouseListener

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased

Methods inherited from interface java.awt.event.MouseMotionListener

mouseDragged, mouseMoved

Constructors

AbstractInsertHandler

public AbstractInsertHandler(ZoomablePanel parent)

Creates a new instance of MouseHandler

Methods

finishInsert

public void finishInsert(java.awt.event.MouseEvent orig_evt)

Completes the insertion by calling InsertMouseHandler.finishInsert(MouseEvent).

Parameters:

orig_evt - the MouseEvent passed from the GlassPane, untransformed

cancelInsert

public void cancelInsert()

Cancels the insertion by calling InsertMouseHandler.finishInsert(MouseEvent).

Parameters:

orig_evt - the MouseEvent passed from the GlassPane, untransformed

getCurrentCursor

public java.awt.Cursor getCurrentCursor()

Retrieves the cursor for the views based off of the currently selected tool.

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent orig_evt)

This handler ignores mouse clicked events

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent orig_evt)

A-793
sets the zoomable panel's cursor to the handler's current cursor

See Also:

getCurrentCursor()

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent orig_evt)

sets the zoomable panel's cursor to the handler's current cursor

See Also:

getCurrentCursor()

mouseExited

public void mouseExited(java.awt.event.MouseEvent orig_evt)

sets the zoomable panel's cursor to the handler's current cursor

See Also:

getCurrentCursor()

A-794
com.cafean.client.ui.tools.insert

Class AbstractPathHandler

java.lang.Object

 |

 +-com.cafean.client.ui.tools.insert.AbstractInsertHandler

 |

 +-com.cafean.client.ui.tools.insert.AbstractPathHandler

public abstract class AbstractPathHandler

extends AbstractInsertHandler

A base class for insert handlers that are based on a path of points.

All Implemented Interfaces:

java.awt.event.MouseMotionListener, java.awt.event.MouseListener

See Also:

com.cafean.client.ui.tools.insert.LineAnnotInsertHandler,

com.cafean.client.ui.tools.insert.PolygonInsertHandler

Field Summary

public static final TOLERANCE

The number of pixels the mouse is required to move before another point can be added.

Value: 5

Constructor Summary

public AbstractPathHandler(ZoomablePanel parent)

Creates a new mouse handler with the given parent

Method Summary

void mouseClicked(java.awt.event.MouseEvent orig_evt)

This insert handler ignores mouseClicked eventss

void mouseDragged(java.awt.event.MouseEvent orig_evt)

Handles mouse moved events by repainting the current rubber bands.

void mouseMoved(java.awt.event.MouseEvent orig_evt)

Handles mouse dragged events by repainting the current rubber bands.

void mousePressed(java.awt.event.MouseEvent orig_evt)

When inactive, mouse events are forwarded as appropriate either to the UI to activate the frame

or to the underlying child component.

void mouseReleased(java.awt.event.MouseEvent orig_evt)

Handles mouse released events by adding points to the path (left button) or removing points

from the path (right button).

Methods inherited from class com.cafean.client.ui.tools.insert.AbstractInsertHandler

A-795
cancelInsert, finishInsert, getCurrentCursor, mouseClicked, mouseEntered, mouseExited,

mouseMoved

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.event.MouseListener

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased

Methods inherited from interface java.awt.event.MouseMotionListener

mouseDragged, mouseMoved

Fields

TOLERANCE

public static final int TOLERANCE

The number of pixels the mouse is required to move before another point can be added.

Constant value: 5

Constructors

AbstractPathHandler

public AbstractPathHandler(ZoomablePanel parent)

Creates a new mouse handler with the given parent

Methods

mousePressed

public void mousePressed(java.awt.event.MouseEvent orig_evt)

When inactive, mouse events are forwarded as appropriate either to the UI to activate the frame or to the underlying child

component.

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent orig_evt)

This insert handler ignores mouseClicked eventss

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent orig_evt)

A-796
Handles mouse moved events by repainting the current rubber bands. This implementation simply calls

mouseMoved(MouseEvent)

Parameters:

orig_event - the MouseEvent fired by the glass pane, untransformed

See Also:

mouseMoved(MouseEvent)

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent orig_evt)

Handles mouse dragged events by repainting the current rubber bands.

Parameters:

orig_event - the MouseEvent fired by the glass pane, untransformed

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent orig_evt)

Handles mouse released events by adding points to the path (left button) or removing points from the path (right button).

Parameters:

orig_event - the MouseEvent fired by the glass pane, untransformed

A-797
com.cafean.client.ui.tools.insert

Interface Insertable

public interface Insertable

extends 

An interface describing JComponents that can be inserted using an AbstractInsertHandler derivative to guide the dimensioning

etc.

All Known Implementing Classes:

LineAnnotation, RectangularAnnotation, EllipticalAnnotation

Method Summary

AbstractInsertHandler getNewInsertHandler(ZoomablePanel parent)

Creates a new insert handler appropriate for handling the mouse events required to properly

insert this insertable object into the given parent.

Methods

getNewInsertHandler

public AbstractInsertHandler getNewInsertHandler(ZoomablePanel parent)

Creates a new insert handler appropriate for handling the mouse events required to properly insert this insertable object into the

given parent.

Returns:

an AbstractInsertHandler properly configured for handling the insertion of this component; or null of none is appropriate

A-798
com.cafean.client.ui.tools.insert

Class RectangularInsertHandler

java.lang.Object

 |

 +-com.cafean.client.ui.tools.insert.AbstractInsertHandler

 |

 +-com.cafean.client.ui.tools.insert.RectangularInsertHandler

public class RectangularInsertHandler

extends AbstractInsertHandler

An insertion handler intended for inserting JComponent derivatives that have rectangular bounds. This handler requires the user to

draw a rectangular rubber box, the box is then used to dimension the created JComponent.

All Implemented Interfaces:

java.awt.event.MouseMotionListener, java.awt.event.MouseListener

Constructor Summary

public RectangularInsertHandler(ZoomablePanel parent, JComponent comp)

Creates a new instance of RectangularInsertHandler

Method Summary

void mouseClicked(java.awt.event.MouseEvent orig_evt)

Completes the insertion by setting the location of the component to the clicked location and

calling finishInsert.

void mouseDragged(java.awt.event.MouseEvent orig_evt)

Continues the process of drawing the rubber band rectangle for bounds selection.

void mousePressed(java.awt.event.MouseEvent orig_evt)

Begins the process of drawing the rubber band rectangle for bounds selection.

void mouseReleased(java.awt.event.MouseEvent orig_evt)

Completes the process of drawing the rubber band rectangle for bounds selection.

Methods inherited from class com.cafean.client.ui.tools.insert.AbstractInsertHandler

cancelInsert, finishInsert, getCurrentCursor, mouseClicked, mouseEntered, mouseExited,

mouseMoved

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.event.MouseListener

mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased

A-799
Methods inherited from interface java.awt.event.MouseMotionListener

mouseDragged, mouseMoved

Constructors

RectangularInsertHandler

public RectangularInsertHandler(ZoomablePanel parent,

 JComponent comp)

Creates a new instance of RectangularInsertHandler

Methods

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent orig_evt)

Completes the insertion by setting the location of the component to the clicked location and calling finishInsert.

mousePressed

public void mousePressed(java.awt.event.MouseEvent orig_evt)

Begins the process of drawing the rubber band rectangle for bounds selection.

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent orig_evt)

Continues the process of drawing the rubber band rectangle for bounds selection.

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent orig_evt)

Completes the process of drawing the rubber band rectangle for bounds selection. setBounts is then called on the component

with the selected rubber band rectangle.

A-800
Package

com.cafean.CodePlugins

A-801
com.cafean.CodePlugins

Class MECodePlugin

java.lang.Object

 |

 +-com.cafean.CodePlugins.MEPlugin

 |

 +-com.cafean.CodePlugins.MECodePlugin

public abstract class MECodePlugin

extends MEPlugin

This is used to implement a new analysis code in the model editor. MECodePlugins contain all the functions common between analysis

code plugins. 

The following is an example implementation of submitModel(AbstractModel, boolean).

A-802
 public void submitModel(AbstractModel model)

 {

 File tmpFile;

 File tmpSaveFile;

 try {

 tmpFile = File.createTempFile("snap",".inp");

 tmpSaveFile = File.createTempFile("snap",".sam");

 } catch( java.io.IOException ioe ) {

 ioe.printStackTrace();

 OptionPane.showMessageDialog( MainFrame.instance,

 "Unable to create required temporary files.",

 "Submit Failed",

 OptionPane.ERROR_MESSAGE );

 return;

 }

 String oldSaveName = model.getSaveFileName();

 model.setSaveFileName( tmpSaveFile.getPath() );

 model.saveModel();

 model.setSaveFileName( oldSaveName );

 boolean success = exportASCII( model, tmpFile );

 if( success ) {

 SubmitDialog dialog = new SubmitDialog( MainFrame.instance,

 MainFrame.instance.getOrb(),

 getPluginId(),

 tmpFile,

 tmpSaveFile,

 MainFrame.instance.getPrefs());

 dialog.setVisible(true);

 }

 tmpFile.delete();

 tmpSaveFile.delete();

 }

Fields inherited from class com.cafean.CodePlugins.MEPlugin

TYPE_CODE_PLUGIN, TYPE_FEATURE_PLUGIN

Constructor Summary

public MECodePlugin(String name)

Creates a new MECodePlugin with the given name.

A-803
Method Summary

abstract

AbstractModel

createNewModel(boolean initNew)

Creates a new instance of the AbstractModel defined by this plugin.

java.io.PrintWriter getAsciiPrintWriter(java.io.Writer output)

Retrieves an appropriately configured print writer for use in writing an ASCII representation of

individual components.

StyledDocument getAsciiStyledDocument(Writeable writeable)

Retrieves a StyledDocument suitable for displaying the written ASCII of the given Writeable

component.

String getLabel()

Retrieves a short string that describes a singular unit of this plugin.

String getLabelPlural()

Retrieves a short string that describes multiple units of this plugin.

ImageIcon getPluginIcon()

Retrieves the icon associated with this plugin.

int getPluginType()

abstract String getSamPackage()

This returns the package name of the SAM files for this plugin.

String getSamPackage(java.io.File f)

This returns the package name of the SAM files for this plugin.

boolean isAnimatable()

Returns true if this MECodePlugin includes support for View animation.

boolean isBeanBased()

Returns true if this MECodePlugin's design is based on the JavaBeans architecture.

abstract

AbstractModel

open(java.io.File file)

Loads a new AbstractModel from the given local File.

abstract void submitModel(AbstractModel model, boolean local)

Submits an AbstractModel to the Calculation Server for execution.

Methods inherited from class com.cafean.CodePlugins.MEPlugin

addCurrentExportItems, addCurrentToolsItems, getName, getPluginHelpSet, getPluginId,

getPluginInfo, getPluginPreferences, getPluginPrereqs, getPluginType, getVersion,

loadMainMenuItems, loadSettings, loadViewMenuItems, processCommand, setName,

storeSettings, toString

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

A-804
Constructors

MECodePlugin

public MECodePlugin(String name)

Creates a new MECodePlugin with the given name.

Methods

getPluginType

public final int getPluginType()

This returns the static type flag that indicates what type of plugin this is.

createNewModel

public abstract AbstractModel createNewModel(boolean initNew)

Creates a new instance of the AbstractModel defined by this plugin. This is a clean model with no components or properties

set.

Parameters:

initNew - if true, the newly created model should be initialized as if just created by the user.

Returns:

an AbstractModel created by this plugin.

open

public abstract AbstractModel open(java.io.File file)

Loads a new AbstractModel from the given local File.

Parameters:

file - the File being read in.

Returns:

an AbstractModel created by this plugin and loaded from file.

getSamPackage

public abstract String getSamPackage()

This returns the package name of the SAM files for this plugin. This is used to determine which plugin a SAM file is

specifying.

Returns:

String containing the package of the SAM definitions.

A-805
getSamPackage

public String getSamPackage(java.io.File f)

This returns the package name of the SAM files for this plugin. This is used to determine which plugin a SAM file is

specifying.

Parameters:

f - the SAM File being opened

Returns:

String containing the package of the SAM definitions.

submitModel

public abstract void submitModel(AbstractModel model,

 boolean local)

Submits an AbstractModel to the Calculation Server for execution.

Parameters:

model - the AbstractModel to submit.

local - TRUE if this is a local submission.

See Also:

com.cafean.utils.SubmitDialog

isBeanBased

public boolean isBeanBased()

Returns true if this MECodePlugin's design is based on the JavaBeans architecture.

isAnimatable

public boolean isAnimatable()

Returns true if this MECodePlugin includes support for View animation. This method is used to enable or disable the playback

controls and animated display bean toolbars, as well as other source manager related functionality.

getAsciiStyledDocument

public StyledDocument getAsciiStyledDocument(Writeable writeable)

Retrieves a StyledDocument suitable for displaying the written ASCII of the given Writeable component.

Parameters:

writeable - the Writeable component to retrieve an appropriate document for

Returns:

the StyledDocument to use when displaying ASCII for the given Writeable

A-806
getAsciiPrintWriter

public java.io.PrintWriter getAsciiPrintWriter(java.io.Writer output)

Retrieves an appropriately configured print writer for use in writing an ASCII representation of individual components.

Plugins may choose to override this method to create derivative PrintWriters that allow for different formatting.

Parameters:

output - the java.io.Writer that the returned PrintWriter will use for it's output.

Returns:

a java.io.PrintWriter suitable for printing ASCII representations of this plugin's data.

getPluginIcon

public ImageIcon getPluginIcon()

Retrieves the icon associated with this plugin.

getLabel

public String getLabel()

Retrieves a short string that describes a singular unit of this plugin. This is used as the label associated with this plugin in the

new file dialog. The default is the ID of the plugin followed by the word "model".

getLabelPlural

public String getLabelPlural()

Retrieves a short string that describes multiple units of this plugin. This is used as the label associated with this plugin in the

navigator. The default is the ID of the plugin followed by the word "models".

A-807
com.cafean.CodePlugins

Class MEFeaturePlugin

java.lang.Object

 |

 +-com.cafean.CodePlugins.MEPlugin

 |

 +-com.cafean.CodePlugins.MEFeaturePlugin

public abstract class MEFeaturePlugin

extends MEPlugin

This is used to implement a new feature plugin for the model editor. It contains all of the functions common between feature plugins in

the model editor.

Fields inherited from class com.cafean.CodePlugins.MEPlugin

TYPE_CODE_PLUGIN, TYPE_FEATURE_PLUGIN

Constructor Summary

public MEFeaturePlugin(String name)

Creates a new instance of MEFeaturePlugin

Method Summary

int getPluginType()

abstract boolean isAssociated(AbstractModel model)

This returns returns true if this plugin contains data that should be saved in the same SAM file

as the given model.

abstract void load(AbstractModel loadedModel, com.apt.xdr.PibFile pibfile)

This is called on all Feature plugins when a model has been loaeded.

abstract void modelAdded(AbstractModel model)

This is called on all Feature plugins when a new model has been added to the model editor.

abstract void modelRemoved(AbstractModel model)

abstract void save(AbstractModel savedModel, com.apt.xdr.PibFile pibfile)

This is called on all Feature plugins when a model has been stored.

Methods inherited from class com.cafean.CodePlugins.MEPlugin

addCurrentExportItems, addCurrentToolsItems, getName, getPluginHelpSet, getPluginId,

getPluginInfo, getPluginPreferences, getPluginPrereqs, getPluginType, getVersion,

loadMainMenuItems, loadSettings, loadViewMenuItems, processCommand, setName,

storeSettings, toString

A-808
Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

MEFeaturePlugin

public MEFeaturePlugin(String name)

Creates a new instance of MEFeaturePlugin

Methods

getPluginType

public final int getPluginType()

This returns the static type flag that indicates what type of plugin this is.

load

public abstract void load(AbstractModel loadedModel,

 com.apt.xdr.PibFile pibfile)

This is called on all Feature plugins when a model has been loaeded. This allows feature plugins that need to load local data

associated with that model to read that data from the end of the file.

Parameters:

loadedModel - the AbstractModel that has just been loaded from disk.

pibfile - the local file that is being read in.

save

public abstract void save(AbstractModel savedModel,

 com.apt.xdr.PibFile pibfile)

This is called on all Feature plugins when a model has been stored. This allows feature plugins that need to store local data

associated with that model to append the data to the end of the file.

Parameters:

savedModel - the AbstractModel that has just been saved to disk.

pibfile - the local file that is being written out.

modelRemoved

public abstract void modelRemoved(AbstractModel model)

A-809
modelAdded

public abstract void modelAdded(AbstractModel model)

This is called on all Feature plugins when a new model has been added to the model editor. This allows all plugins that need to

store local data associated with that type of model to initalizes any data they need.

Parameters:

model - the AbstractModel just added to the model Editor.

isAssociated

public abstract boolean isAssociated(AbstractModel model)

This returns returns true if this plugin contains data that should be saved in the same SAM file as the given model.

Parameters:

model - the AbstractModel to check association with

Returns:

true if this plugin has data that needs to save in the sam file as the model.

A-810
com.cafean.CodePlugins

Class MEPlugin

java.lang.Object

 |

 +-com.cafean.CodePlugins.MEPlugin

public abstract class MEPlugin

extends Object

The base class for a Model Editor plugin. User defined plugins should not extend this class, but rather extend either MECodePlugin or

MEFeaturePlugin.

Direct Known Subclasses:

MECodePlugin, MEFeaturePlugin

Field Summary

public static final TYPE_CODE_PLUGIN

the typecode for analysis code support plugins

Value: 1

public static final TYPE_FEATURE_PLUGIN

the typecode for feature addition plugins

Value: 2

Constructor Summary

public MEPlugin(String name)

Creates a new MEPlugin with the given name.

Method Summary

void addCurrentExportItems(JMenu menu)

Adds appropriate export menu items to the given JMenu with respect to the type and state of

the current model.

void addCurrentToolsItems(JMenu menu)

Adds appropriate Tools menu items to the given JMenu with respect to the type and state of the

current model.

String getName()

This returns the descriptive name of this plugin.

javax.help.HelpSet getPluginHelpSet()

Retrieves the HelpSet for this plug-in, if one is available.

abstract String getPluginId()

This returns the static plugin id.

A-811
abstract String getPluginInfo()

Returns the information about this plugin that will appear in the Plugins dialog.

Object getPluginPreferences()

Retrieves an Object that follows the Java Beans design paradigm that contains the preferences

for this plugin.

String[] getPluginPrereqs()

Returns the names and versions of the plugins this plugin depends upon.

abstract int getPluginType()

This returns the static type flag that indicates what type of plugin this is.

String getVersion()

Returns the version number of this plugin as a String.

abstract void loadMainMenuItems()

Loads this plugin's menu items into the MainFrame menu bar.

abstract void loadSettings(Configurator config)

Loads user settings for this plugin from the configuration file.

abstract void loadViewMenuItems(DrawnView view)

Loads this plugin's menu items into a DrawnView's Tools menu.

abstract void processCommand(Vector command)

Processes the given batch command.

void setName(String name)

This sets the descriptive name of this plugin.

abstract void storeSettings(Configurator config)

Stores user settings for this plugin into the configuration file.

String toString()

returns the plug-in id of this plug-in

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

TYPE_CODE_PLUGIN

public static final int TYPE_CODE_PLUGIN

the typecode for analysis code support plugins

Constant value: 1

A-812
TYPE_FEATURE_PLUGIN

public static final int TYPE_FEATURE_PLUGIN

the typecode for feature addition plugins

Constant value: 2

Constructors

MEPlugin

public MEPlugin(String name)

Creates a new MEPlugin with the given name.

Parameters:

name - a String containing the new name.

Methods

getName

public String getName()

This returns the descriptive name of this plugin.

Returns:

The Descriptive name of this plugin.

setName

public void setName(String name)

This sets the descriptive name of this plugin.

Parameters:

name - The Descriptive name of this plugin.

getPluginId

public abstract String getPluginId()

This returns the static plugin id. This is used to clearly and easily differentiate between plugins.

Returns:

The short identifier for this plugin.

getPluginType

public abstract int getPluginType()

This returns the static type flag that indicates what type of plugin this is.

See Also:

A-813
TYPE_CODE_PLUGIN

TYPE_FEATURE_PLUGIN

processCommand

public abstract void processCommand(Vector command)

 throws java.io.IOException

Processes the given batch command. This method should assume that the plugin id prefix has been removed from the

command before passing to processCommand.

Parameters:

command - a Vector of Strings containing the batch command to be executed.

Throws:

IOException - on failure to process the command.

loadMainMenuItems

public abstract void loadMainMenuItems()

Loads this plugin's menu items into the MainFrame menu bar.

Use the menu insertion function in MainFrame to add new JMenuItems to the toolbar's menus.

See Also:

MainFrame.addImportItem(JMenuItem)

MainFrame.addExportItem(JMenuItem)

MainFrame.addMenuItem(JMenuItem, String)

loadViewMenuItems

public abstract void loadViewMenuItems(DrawnView view)

Loads this plugin's menu items into a DrawnView's Tools menu.

Use DrawnView.addMenuItem(JMenuItem) to add new JMenuItems to tools menu.

See Also:

DrawnView.addMenuItem(JMenuItem)

addCurrentExportItems

public void addCurrentExportItems(JMenu menu)

Adds appropriate export menu items to the given JMenu with respect to the type and state of the current model.

Note: This is called each time the export menu is selected. To add permanent items use

MainFrame.addExportItem(JMenuItem).

Parameters:

menu - the JMenu to add export related items to.

A-814
addCurrentToolsItems

public void addCurrentToolsItems(JMenu menu)

Adds appropriate Tools menu items to the given JMenu with respect to the type and state of the current model.

Note: This is called each time the Tools menu is selected.

Parameters:

menu - the JMenu to add tool related items to.

loadSettings

public abstract void loadSettings(Configurator config)

Loads user settings for this plugin from the configuration file.

Parameters:

config - the Configurator used to access the locally stored settings.

storeSettings

public abstract void storeSettings(Configurator config)

Stores user settings for this plugin into the configuration file.

Parameters:

config - the Configurator used to access the locally stored settings.

getVersion

public String getVersion()

Returns the version number of this plugin as a String. The returned version number should be formatted as:

[major].[minor].[bugfix]. For example: 1.0.2.

This base implementation attempts to retrieve the plug-in version from the plug-in's JAR file manifest by retrieving the

"MEPluginData-Version" property. Extensions of this class may choose to override this to handle version access in other ways.

Returns:

a String containing the version number.

getPluginPrereqs

public String[] getPluginPrereqs()

Returns the names and versions of the plugins this plugin depends upon. Each dependency is formatted as: [plugin

id]:[version] where the version is considered the minimum acceptable version.

For example: RELAP5:0.1.0

This base implementation attempts to retrieve the plug-in prerequisites from the "MEPluginData-RequiredPlugins" property of

the plug-in's JAR file manifest as a '|' separated list of [PLUGIN]:[VERSION] as shown above. NOTE: Colons must be

escaped in java manifest files, thus: "RELAP5\:0.1.0"

Extensions of this class may choose to override this to handle prerequisite access in other ways.

A-815
Returns:

a String[] containing all the plugins this depends upon.

getPluginInfo

public abstract String getPluginInfo()

Returns the information about this plugin that will appear in the Plugins dialog. This should be either unformatted text, or

alternatively, HTML to be placed between existing <HTML> and <BODY> tags.

Returns:

a String containing a description of this plugin.

getPluginPreferences

public Object getPluginPreferences()

Retrieves an Object that follows the Java Beans design paradigm that contains the preferences for this plugin. These

preferences must be stored along with other plugin values.

Returns:

an Object that contains the plugin's preferences.

getPluginHelpSet

public javax.help.HelpSet getPluginHelpSet()

Retrieves the HelpSet for this plug-in, if one is available. Plug-in helpsets are assumed to be located in:

i18n/[locale]/[plug-in id]. For example: i18n/en/MyPlugin would refer to the english documentation for the plugin called MyPlugin.

Thie method will print an error message to STDERR when the debug flag is on if no help set is found in the expected location.

The MyPlugin online help is not available. [i18n/en/MyPlugin]

Plug-ins that place the plug-in help set in a different location may override this method to return an appropriate HelpSet.

Returns:

a javax.help.HelpSet properly configured for the javahelp for this plug-in.

toString

public String toString()

returns the plug-in id of this plug-in

A-816
com.cafean.CodePlugins

Class MEPluginData

java.lang.Object

 |

 +-com.cafean.CodePlugins.MEPluginData

public abstract class MEPluginData

extends Object

The MEPluginData is used to hold all the data necessary to determine when and how the plugin should be read in. This allows the

plugin loader to determine if the appropriate prerequisite plugins have been loaded, and that the necessary classes are available.

Constructor Summary

public MEPluginData()

Creates a new instance of MEPluginData

Method Summary

String[] getClassPrereqs()

Returns the name of any specific classes required by this plugin that are not included in the

main ModelEditor distribution, the standard Java distribution or this plugin.

abstract String getPluginClass()

Returns the absolute path to the primary class for the plugin in string form.

abstract String getPluginId()

Returns this plugin's plugin-id.

String[] getPluginPrereqs()

Returns the names and versions of the plugins this plugin depends upon.

String getVersion()

Returns the current plugin version.

abstract MEPlugin loadPlugin()

Creates an instance of the MEPlugin that is described by this MEPluginData object.

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

MEPluginData

public MEPluginData()

A-817
Creates a new instance of MEPluginData

Methods

getPluginClass

public abstract String getPluginClass()

Returns the absolute path to the primary class for the plugin in string form. This is used to tell the plugin manager which class

in the plugin extends MEPlugin.

Returns:

a String containing the path to the plugin class.

getPluginId

public abstract String getPluginId()

Returns this plugin's plugin-id. The value returned should be the same staticly declared value returned by the plugin's

MEPlugin.getPluginId() and the model's getPluginId.

Returns:

a String containing the plugin-id

getVersion

public String getVersion()

Returns the current plugin version. The returned version number should be formatted as: [major].[minor].[bugfix]. For

example: 1.0.2.

This is used by the plugin manager to determine whether a dependent plugin will work with this version.

This base implementation attempts to retrieve the plug-in version from the plug-in's JAR file manifest by retrieving the

"MEPluginData-Version" property. Extensions of this class may choose to override this to handle version access in other ways.

Returns:

a String containing the current version of this plugin.

getPluginPrereqs

public String[] getPluginPrereqs()

Returns the names and versions of the plugins this plugin depends upon. Each dependency is formatted as: [plugin

id]:[version] where the version is considered the minimum acceptable version.

For example: RELAP5:0.1.0

This base implementation attempts to retrieve the plug-in prerequisites from the "MEPluginData-RequiredPlugins" property of

the plug-in's JAR file manifest as a '|' separated list of [PLUGIN]:[VERSION] as shown above. NOTE: Colons must be

escaped in java manifest files, thus: "RELAP5\:0.1.0"

Extensions of this class may choose to override this to handle prerequisite access in other ways.

Returns:

a String[] containing all the plugins this depends upon.

A-818
getClassPrereqs

public String[] getClassPrereqs()

Returns the name of any specific classes required by this plugin that are not included in the main ModelEditor distribution, the

standard Java distribution or this plugin.

For example: RELAP5:0.1.0

This base implementation attempts to retrieve the plug-in class prerequisites from the "MEPluginData-RequiredClasses"

property of the plug-in's JAR file manifest as a '|' separated list of class names.

Extensions of this class may choose to override this to handle prerequisite class name access in other ways.

Returns:

a String[] containing the full path of each Class required by this plugin.

loadPlugin

public abstract MEPlugin loadPlugin()

Creates an instance of the MEPlugin that is described by this MEPluginData object.

Any initialization required by MEPlugin subclasses ( except for MEPlugin.loadMainMenuItems() and

MEPlugin.loadSettings(Configurator) which are called after the plugin is loaded ), should be done at this time.

Returns:

an MEPlugin instance loaded with this MEPluginData's classloader.

A-819
Package

com.cafean.Number

Provides classes for handling various types of numbers as mutable wrappers. Wrappers are provided for real numbers as a double

precision float as well as integers and booleans. 

Each class handles conversion between SI and English units and stores all data in SI units internally.

Various number related utility classes have been provided, such as IntegerArray.

A-820
com.cafean.Number

Class Angle

java.lang.Object

 |

 +-com.cafean.Number.BaseNumber

 |

 +-com.cafean.Number.Real

 |

 +-com.cafean.Number.Angle

public class Angle

extends Real

A Real derivative for storing angle values. Stores radians internally and degrees externally. 

English Units: degrees, SI Units: degrees.

All Implemented Interfaces:

Cloneable, java.awt.datatransfer.Transferable, Comparable, Cloneable

Field Summary

public static final halfPI

Value: 1.5707963267948966

Fields inherited from class com.cafean.Number.Real

Unknown

Fields inherited from class com.cafean.Number.BaseNumber

BRITISH, SI, UNIT_NAMES

Constructor Summary

public Angle()

Creates a new instance with an unknown value.

public Angle(double d)

Creates a new instance initialized to a value.

Method Summary

void convert(double d)

Converts the double given into the global units, and sets the result as the value of this Real.

A-821
void convert(Number n)

Converts the doubleValue of the Number given to the global units. The result of the conversion

is set as the current value of this Real.

double getConversionFactor()

Retrieves the conversion factor used to convert this Real's value from SI to British units.

double getDisplayValue(int unittypes)

String getENG_Units()

Retrieves a String representation of this Real's English unit type.

java.text.DecimalForm

at

getFormat(double value)

Return the format used to represent a value.

String getSI_Units()

Retrieves a String representation of this Real's SI unit type.

boolean isMostlyVerticalDown()

Return true if the angle is < -45 degress.

boolean isMostlyVerticalUp()

Return true if the angle is > 45 degress.

boolean isVerticalDown()

Return true if the angle is close to -180 degress.

boolean isVerticalUp()

Return true if the angle is close to 180 degress.

Methods inherited from class com.cafean.Number.Real

abs, add, add, arraysEqual, clone, compareTo, convert, convert, convert, convert,

convert, divide, divide, divideby, divideby, equals, equals, equals, equals, equals,

getConversionFactor, getCurrentDisplayValue, getDataValue, getDisplayName,

getDoubleValue, getENG_Units, getFormat, getHtmlUnits, getHtmlUnits, getLoadFormat,

getName, getReferencedValue, getSI_Units, getSignificantFigs, getStrippedValue,

getTransferData, getTransferDataFlavors, getUnitName, getUnits, getValue, greaterthan,

greaterthan, isDataFlavorSupported, isKnown, isUnknown, lessthan, lessthan,

lockToString, multiply, multiply, normalizeArray, restoreState, setDataValue,

setSignificantFigs, setUnknown, setValue, setValue, setValue, setValue,

sortParallelRealArrays, sqrt, storeState, subtract, subtract, toLoadString,

toLoadString, toString, toString, unlockToString

Methods inherited from class com.cafean.Number.BaseNumber

clone, compareDouble, convert, getENG_Units, getFormat, getSI_Units, getUnits,

getUnitType, isKnown, isUnknown, setKnown, setUnitType, setUnknown, setValue, setValue,

toString

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

A-822
Methods inherited from interface java.lang.Comparable

compareTo

Methods inherited from interface java.awt.datatransfer.Transferable

getTransferData, getTransferDataFlavors, isDataFlavorSupported

Fields

halfPI

public static final double halfPI

Constant value: 1.5707963267948966

Constructors

Angle

public Angle()

Creates a new instance with an unknown value.

Angle

public Angle(double d)

Creates a new instance initialized to a value.

Parameters:

d - The initial value.

Methods

getConversionFactor

public double getConversionFactor()

Retrieves the conversion factor used to convert this Real's value from SI to British units.

getSI_Units

public String getSI_Units()

Retrieves a String representation of this Real's SI unit type.

getENG_Units

public String getENG_Units()

A-823
Retrieves a String representation of this Real's English unit type.

convert

public void convert(Number n)

Converts the doubleValue of the Number given to the global units. The result of the conversion is set as the current value of

this Real.

convert

public void convert(double d)

Converts the double given into the global units, and sets the result as the value of this Real.

getFormat

public java.text.DecimalFormat getFormat(double value)

Return the format used to represent a value.

getDisplayValue

public double getDisplayValue(int unittypes)

Returns the value to display. This gets the numerical value and converts it if the given unittype is BRITISH.

isVerticalUp

public boolean isVerticalUp()

Return true if the angle is close to 180 degress.

isVerticalDown

public boolean isVerticalDown()

Return true if the angle is close to -180 degress.

isMostlyVerticalDown

public boolean isMostlyVerticalDown()

Return true if the angle is < -45 degress.

isMostlyVerticalUp

public boolean isMostlyVerticalUp()

Return true if the angle is > 45 degress.

A-824
com.cafean.Number

Class BaseNumber

java.lang.Object

 |

 +-com.cafean.Number.BaseNumber

public abstract class BaseNumber

extends Object

implements Cloneable

BaseNumber is the abstract class used to represent all numbers in the ModelEditor.

All Implemented Interfaces:

Cloneable

Direct Known Subclasses:

Real, Int

Field Summary

public static final BRITISH

The enumeration value for British units.

Value: 1

public static final SI

The enumeration value for SI units.

Value: 0

public static final UNIT_NAMES

A list of supported unit Types and their labels.

Constructor Summary

public BaseNumber()

Creates a new instance of a BaseNumber.

Method Summary

Object clone()

static boolean compareDouble(double a, double b, double eps)

Compares two doubles to see if they are within epsilon of each other.

abstract void convert(Number n)

convert set the object to a value using the current unit type conversion.

abstract String getENG_Units()

Return the string used to represent BRITISH units.

A-825
abstract

java.text.DecimalForm

at

getFormat(double value)

Return the format used to represent a value.

abstract String getSI_Units()

Return the string used to represent SI units.

String getUnits()

Retrieves a string representation of the current units.

static int getUnitType()

Retrieves the global default unit type

boolean isKnown()

Return true if the value if known, otherwise return false.

boolean isUnknown()

void setKnown()

Set the unknown flag to false.

static void setUnitType(int t)

Sets the global default unit type

void setUnknown()

Set the unknown flag to true.

abstract void setValue(BaseNumber n)

setValue sets the object to a value from another BaseNumber.

abstract void setValue(Number n)

setValue sets the object to a value without unit type conversion.

abstract String toString()

toString translates the internal value to a string in the current unit type.

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

UNIT_NAMES

public static final java.lang.String UNIT_NAMES

A list of supported unit Types and their labels.

SI

public static final int SI

The enumeration value for SI units.

A-826
Constant value: 0

BRITISH

public static final int BRITISH

The enumeration value for British units.

Constant value: 1

Constructors

BaseNumber

public BaseNumber()

Creates a new instance of a BaseNumber.

Methods

getUnitType

public static int getUnitType()

Retrieves the global default unit type

Returns:

SI or BRITISH.

setUnitType

public static void setUnitType(int t)

Sets the global default unit type

Parameters:

t - SI or BRITISH.

getSI_Units

public abstract String getSI_Units()

Return the string used to represent SI units.

Returns:

The SI unit label.

getENG_Units

public abstract String getENG_Units()

Return the string used to represent BRITISH units.

Returns:

The BRITISH unit label.

A-827
setUnknown

public void setUnknown()

Set the unknown flag to true.

setKnown

public void setKnown()

Set the unknown flag to false.

isUnknown

public boolean isUnknown()

isKnown

public boolean isKnown()

Return true if the value if known, otherwise return false.

Returns:

true if the value if known, otherwise return false.

toString

public abstract String toString()

toString translates the internal value to a string in the current unit type.

setValue

public abstract void setValue(Number n)

setValue sets the object to a value without unit type conversion.

setValue

public abstract void setValue(BaseNumber n)

setValue sets the object to a value from another BaseNumber.

Parameters:

n - The base number that the value will be copied from.

convert

public abstract void convert(Number n)

convert set the object to a value using the current unit type conversion.

A-828
getFormat

public abstract java.text.DecimalFormat getFormat(double value)

Return the format used to represent a value.

Parameters:

value - The number to be formatted.

Returns:

The format.

clone

public Object clone()

getUnits

public String getUnits()

Retrieves a string representation of the current units.

compareDouble

public static boolean compareDouble(double a,

 double b,

 double eps)

Compares two doubles to see if they are within epsilon of each other.

Parameters:

a - the first number

b - the second number

eps - epsilon

Returns:

true if a and b are within eps of each other, false otherwise.

A-829
com.cafean.Number

Class Dimless

java.lang.Object

 |

 +-com.cafean.Number.BaseNumber

 |

 +-com.cafean.Number.Real

 |

 +-com.cafean.Number.Dimless

public class Dimless

extends Real

A mutable dimensionless value.

All Implemented Interfaces:

Cloneable, java.awt.datatransfer.Transferable, Comparable, Cloneable

Fields inherited from class com.cafean.Number.Real

Unknown

Fields inherited from class com.cafean.Number.BaseNumber

BRITISH, SI, UNIT_NAMES

Constructor Summary

public Dimless()

Creates a new instance with an unknown value.

public Dimless(double d)

Creates a new instance initialized to a value.

Method Summary

double getConversionFactor()

Retrieves the conversion factor used to convert this Real's value from SI to British units.

String getENG_Units()

Retrieves a String representation of this Real's English unit type.

String getSI_Units()

Retrieves a String representation of this Real's SI unit type.

static Dimless[] makeArray(double[] dArray)

Create an array of Dimless objects from an array of doubles.

static Dimless[] makeArray(Vector vector)

Create an array of Dimless objects from a vector of Dimless.

A-830
Methods inherited from class com.cafean.Number.Real

abs, add, add, arraysEqual, clone, compareTo, convert, convert, convert, convert,

convert, divide, divide, divideby, divideby, equals, equals, equals, equals, equals,

getConversionFactor, getCurrentDisplayValue, getDataValue, getDisplayName,

getDoubleValue, getENG_Units, getFormat, getHtmlUnits, getHtmlUnits, getLoadFormat,

getName, getReferencedValue, getSI_Units, getSignificantFigs, getStrippedValue,

getTransferData, getTransferDataFlavors, getUnitName, getUnits, getValue, greaterthan,

greaterthan, isDataFlavorSupported, isKnown, isUnknown, lessthan, lessthan,

lockToString, multiply, multiply, normalizeArray, restoreState, setDataValue,

setSignificantFigs, setUnknown, setValue, setValue, setValue, setValue,

sortParallelRealArrays, sqrt, storeState, subtract, subtract, toLoadString,

toLoadString, toString, toString, unlockToString

Methods inherited from class com.cafean.Number.BaseNumber

clone, compareDouble, convert, getENG_Units, getFormat, getSI_Units, getUnits,

getUnitType, isKnown, isUnknown, setKnown, setUnitType, setUnknown, setValue, setValue,

toString

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.lang.Comparable

compareTo

Methods inherited from interface java.awt.datatransfer.Transferable

getTransferData, getTransferDataFlavors, isDataFlavorSupported

Constructors

Dimless

public Dimless()

Creates a new instance with an unknown value.

Dimless

public Dimless(double d)

Creates a new instance initialized to a value.

Parameters:

d - The initial value.

Methods

A-831
getConversionFactor

public double getConversionFactor()

Retrieves the conversion factor used to convert this Real's value from SI to British units.

getSI_Units

public String getSI_Units()

Retrieves a String representation of this Real's SI unit type.

getENG_Units

public String getENG_Units()

Retrieves a String representation of this Real's English unit type.

makeArray

public static Dimless[] makeArray(double[] dArray)

Create an array of Dimless objects from an array of doubles.

Parameters:

dArray - The array of doubles.

Returns:

An array of Dimless initialized to the values in dArray.

makeArray

public static Dimless[] makeArray(Vector vector)

Create an array of Dimless objects from a vector of Dimless.

Parameters:

vector - The vector of Dimless objects.

Returns:

An array of Dimless initialized to the values in vector.

A-832
com.cafean.Number

Class DoubleArray

java.lang.Object

 |

 +-com.cafean.Number.DoubleArray

public class DoubleArray

extends Object

implements Cloneable

An unsynchronized dynamicaly sized array of double.

All Implemented Interfaces:

Cloneable

Constructor Summary

public DoubleArray(int capacity)

Creates a new DoubleArray with the given initial capacity.

public DoubleArray(double[] array)

Method Summary

void add(double value)

Appends the given double to the DoubleArray's data.

void add(double[] values)

Appends the given data to the DoubleArray's data.

int capacity()

Returns this DoubleArray's current capacity.

void clear()

Sets this DoubleArray empty.

Object clone()

boolean contains(double value)

Returns true if the given value is contained in this DoubleArray.

double get(int index)

Returns the value of the double at the given index.

int indexOf(double value)

Retrieves the index of the first occurance of the given value in this DoubleArray.

static void main(String[] args)

Performs a thorough test of the DoubleArray's functionality.

A-833
void remove(int index)

Removes the double at the given index.

void set(int index, double value)

Sets the given value at the given index.

int size()

Returns the number of ints stored in this DoubleArray

void sort()

Sorts this DoubleArray via java.util.Arrays.sort().

double[] toArray()

Returns an double array containing only the used elements of this DoubleArray.

void trimToSize()

Trims the capacity of this DoubleArray instance to be the list's current size.

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

DoubleArray

public DoubleArray(int capacity)

Creates a new DoubleArray with the given initial capacity.

DoubleArray

public DoubleArray(double[] array)

Methods

clear

public void clear()

Sets this DoubleArray empty.

clone

public Object clone()

A-834
contains

public boolean contains(double value)

Returns true if the given value is contained in this DoubleArray.

add

public void add(double value)

Appends the given double to the DoubleArray's data. NOTE: Expected O(1), Worst case O(n) complexity ( resize )

add

public void add(double[] values)

Appends the given data to the DoubleArray's data. If size is currently 0, the values given are cloned. NOTE: Expected O(1),

Worst case O(n) complexity ( resize )

main

public static void main(String[] args)

Performs a thorough test of the DoubleArray's functionality.

indexOf

public int indexOf(double value)

Retrieves the index of the first occurance of the given value in this DoubleArray.

remove

public void remove(int index)

Removes the double at the given index.

NOTE: O(n) complexity.

get

public double get(int index)

Returns the value of the double at the given index. NOTE: O(1) complexity.

set

public void set(int index,

 double value)

Sets the given value at the given index.

A-835
size

public final int size()

Returns the number of ints stored in this DoubleArray

capacity

public final int capacity()

Returns this DoubleArray's current capacity.

sort

public void sort()

Sorts this DoubleArray via java.util.Arrays.sort(). First calls trimToSize().

trimToSize

public void trimToSize()

Trims the capacity of this DoubleArray instance to be the list's current size. An application can use this operation to minimize

the storage of an DoubleArray instance.

toArray

public double[] toArray()

Returns an double array containing only the used elements of this DoubleArray.

NOTE: This is a defensive copy, even if sizes match.

A-836
com.cafean.Number

Class FloatArray

java.lang.Object

 |

 +-com.cafean.Number.FloatArray

public class FloatArray

extends Object

implements Cloneable

An unsynchronized dynamicaly sized array of float.

All Implemented Interfaces:

Cloneable

Constructor Summary

public FloatArray(int capacity)

Creates a new FloatArray with the given initial capacity.

public FloatArray(float[] array)

Method Summary

void add(float value)

Appends the given float to the FloatArray's data.

void add(float[] values)

Appends the given data to the FloatArray's data.

int capacity()

Returns this FloatArray's current capacity.

void clear()

Sets this FloatArray empty.

Object clone()

boolean contains(float value)

Returns true if the given value is contained in this FloatArray.

float get(int index)

Returns the value of the float at the given index.

int indexOf(float value)

Retrieves the index of the first occurance of the given value in this FloatArray.

static void main(String[] args)

Performs a thorough test of the FloatArray's functionality.

A-837
void remove(int index)

Removes the float at the given index.

void set(int index, float value)

Sets the given value at the given index.

int size()

Returns the number of ints stored in this FloatArray

void sort()

Sorts this FloatArray via java.util.Arrays.sort().

float[] toArray()

Returns an float array containing only the used elements of this FloatArray.

void trimToSize()

Trims the capacity of this FloatArray instance to be the list's current size.

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

FloatArray

public FloatArray(int capacity)

Creates a new FloatArray with the given initial capacity.

FloatArray

public FloatArray(float[] array)

Methods

clear

public void clear()

Sets this FloatArray empty.

clone

public Object clone()

A-838
contains

public boolean contains(float value)

Returns true if the given value is contained in this FloatArray.

add

public void add(float value)

Appends the given float to the FloatArray's data. NOTE: Expected O(1), Worst case O(n) complexity ( resize )

add

public void add(float[] values)

Appends the given data to the FloatArray's data. If size is currently 0, the values given are cloned. NOTE: Expected O(1),

Worst case O(n) complexity ( resize )

main

public static void main(String[] args)

Performs a thorough test of the FloatArray's functionality.

indexOf

public int indexOf(float value)

Retrieves the index of the first occurance of the given value in this FloatArray.

remove

public void remove(int index)

Removes the float at the given index.

NOTE: O(n) complexity.

get

public float get(int index)

Returns the value of the float at the given index. NOTE: O(1) complexity.

set

public void set(int index,

 float value)

Sets the given value at the given index.

A-839
size

public final int size()

Returns the number of ints stored in this FloatArray

capacity

public final int capacity()

Returns this FloatArray's current capacity.

sort

public void sort()

Sorts this FloatArray via java.util.Arrays.sort(). First calls trimToSize().

trimToSize

public void trimToSize()

Trims the capacity of this FloatArray instance to be the list's current size. An application can use this operation to minimize the

storage of an FloatArray instance.

toArray

public float[] toArray()

Returns an float array containing only the used elements of this FloatArray.

NOTE: This is a defensive copy, even if sizes match.

A-840
com.cafean.Number

Class Int

java.lang.Object

 |

 +-com.cafean.Number.BaseNumber

 |

 +-com.cafean.Number.Int

public class Int

extends BaseNumber

implements Cloneable, Comparable

A mutable wrapper for an int.

All Implemented Interfaces:

Comparable, Cloneable

Field Summary

public static final Unknown

Value: -99119900

public value

Fields inherited from class com.cafean.Number.BaseNumber

BRITISH, SI, UNIT_NAMES

Constructor Summary

public Int()

public Int(int aInt)

public Int(Int aInt)

Method Summary

Int add(int x)

Int add(Int aInt)

int compareTo(Object o)

void convert(Long n)

A-841
void convert(Number n)

void convert(String s)

Int divide(Int aInt)

boolean equals(int aInt)

boolean equals(Int aInt)

boolean equals(Object o)

int getConversionFactor()

String getENG_Units()

java.text.DecimalForm

at

getFormat()

java.text.DecimalForm

at

getFormat(double d)

String getSI_Units()

int getValue()

boolean greaterthan(int aInt)

boolean greaterthan(Int aInt)

int hashCode()

boolean lessthan(int aInt)

boolean lessthan(Int aInt)

Int multiply(Int aInt)

void setValue(BaseNumber a)

void setValue(int aInt)

void setValue(Number n)

void setValue(String aString)

A-842
Int sqrt()

Int subtract(int x)

Int subtract(Int aInt)

String toString()

Methods inherited from class com.cafean.Number.BaseNumber

clone, compareDouble, convert, getENG_Units, getFormat, getSI_Units, getUnits,

getUnitType, isKnown, isUnknown, setKnown, setUnitType, setUnknown, setValue, setValue,

toString

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.lang.Comparable

compareTo

Fields

value

public int value

Unknown

public static final int Unknown

Constant value: -99119900

Constructors

Int

public Int()

Int

public Int(int aInt)

A-843
Int

public Int(Int aInt)

Methods

getConversionFactor

public int getConversionFactor()

getSI_Units

public String getSI_Units()

Return the string used to represent SI units.

getENG_Units

public String getENG_Units()

Return the string used to represent BRITISH units.

setValue

public void setValue(BaseNumber a)

setValue sets the object to a value from another BaseNumber.

setValue

public void setValue(String aString)

setValue

public void setValue(int aInt)

setValue

public void setValue(Number n)

setValue sets the object to a value without unit type conversion.

A-844
getValue

public int getValue()

convert

public void convert(Number n)

convert set the object to a value using the current unit type conversion.

convert

public void convert(Long n)

convert

public void convert(String s)

toString

public String toString()

toString translates the internal value to a string in the current unit type.

getFormat

public java.text.DecimalFormat getFormat(double d)

Return the format used to represent a value.

getFormat

public java.text.DecimalFormat getFormat()

hashCode

public int hashCode()

compareTo

public int compareTo(Object o)

A-845
equals

public boolean equals(int aInt)

equals

public boolean equals(Int aInt)

equals

public boolean equals(Object o)

lessthan

public boolean lessthan(Int aInt)

lessthan

public boolean lessthan(int aInt)

greaterthan

public boolean greaterthan(Int aInt)

greaterthan

public boolean greaterthan(int aInt)

add

public Int add(Int aInt)

add

public Int add(int x)

A-846
subtract

public Int subtract(Int aInt)

subtract

public Int subtract(int x)

multiply

public Int multiply(Int aInt)

divide

public Int divide(Int aInt)

sqrt

public Int sqrt()

A-847
com.cafean.Number

Class IntegerArray

java.lang.Object

 |

 +-com.cafean.Number.IntegerArray

public class IntegerArray

extends Object

implements Cloneable

An unsynchronized dynamicaly sized array of int.

All Implemented Interfaces:

Cloneable

Constructor Summary

public IntegerArray(int capacity)

Creates a new IntegerArray with the given initial capacity.

public IntegerArray(int[] array)

Method Summary

void add(int value)

Appends the given int to the IntegerArray's data.

void add(int[] values)

Appends the given data to the IntegerArray's data.

int capacity()

Returns this IntegerArray's current capacity.

void clear()

Sets this IntegerArray empty.

Object clone()

boolean contains(int value)

Returns true if the given value is contained in this IntegerArray.

int get(int index)

Returns the value of the int at the given index.

int indexOf(int value)

Retrieves the index of the first occurance of the given value in this IntegerArray.

static void main(String[] args)

Performs a thorough test of the IntegerArray's functionality.

A-848
void remove(int index)

Removes the int at the given index.

void set(int index, int value)

Sets the given value at the given index.

int size()

Returns the number of ints stored in this IntegerArray

void sort()

Sorts this IntegerArray via java.util.Arrays.sort().

int[] toArray()

Returns an int array containing only the used elements of this IntegerArray.

void trimToSize()

Trims the capacity of this IntegerArray instance to be the list's current size.

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

IntegerArray

public IntegerArray(int capacity)

Creates a new IntegerArray with the given initial capacity.

IntegerArray

public IntegerArray(int[] array)

Methods

clear

public void clear()

Sets this IntegerArray empty.

clone

public Object clone()

A-849
contains

public boolean contains(int value)

Returns true if the given value is contained in this IntegerArray.

add

public void add(int value)

Appends the given int to the IntegerArray's data. NOTE: Expected O(1), Worst case O(n) complexity ( resize )

add

public void add(int[] values)

Appends the given data to the IntegerArray's data. If size is currently 0, the values given are cloned. NOTE: Expected O(1),

Worst case O(n) complexity ( resize )

main

public static void main(String[] args)

Performs a thorough test of the IntegerArray's functionality.

indexOf

public int indexOf(int value)

Retrieves the index of the first occurance of the given value in this IntegerArray.

remove

public void remove(int index)

Removes the int at the given index.

NOTE: O(n) complexity.

get

public int get(int index)

Returns the value of the int at the given index. NOTE: O(1) complexity.

set

public void set(int index,

 int value)

Sets the given value at the given index.

A-850
size

public final int size()

Returns the number of ints stored in this IntegerArray

capacity

public final int capacity()

Returns this IntegerArray's current capacity.

sort

public void sort()

Sorts this IntegerArray via java.util.Arrays.sort(). First calls trimToSize().

trimToSize

public void trimToSize()

Trims the capacity of this IntegerArray instance to be the list's current size. An application can use this operation to minimize

the storage of an IntegerArray instance.

toArray

public int[] toArray()

Returns an int array containing only the used elements of this IntegerArray.

NOTE: This is a defensive copy, even if sizes match.

A-851
com.cafean.Number

Class LongArray

java.lang.Object

 |

 +-com.cafean.Number.LongArray

public class LongArray

extends Object

implements Cloneable

An unsynchronized dynamicaly sized array of long.

All Implemented Interfaces:

Cloneable

Constructor Summary

public LongArray(int capacity)

Creates a new LongArray with the given initial capacity.

public LongArray(long[] array)

Method Summary

void add(long value)

Appends the given long to the LongArray's data.

void add(long[] values)

Appends the given data to the LongArray's data.

int capacity()

Returns this LongArray's current capacity.

void clear()

Sets this LongArray empty.

Object clone()

boolean contains(long value)

Returns true if the given value is contained in this LongArray.

long get(int index)

Returns the value of the long at the given index.

int indexOf(long value)

Retrieves the index of the first occurance of the given value in this LongArray.

static void main(String[] args)

Performs a thorough test of the LongArray's functionality.

A-852
void remove(int index)

Removes the long at the given index.

void set(int index, long value)

Sets the given value at the given index.

int size()

Returns the number of ints stored in this LongArray

void sort()

Sorts this LongArray via java.util.Arrays.sort().

long[] toArray()

Returns an long array containing only the used elements of this LongArray.

void trimToSize()

Trims the capacity of this LongArray instance to be the list's current size.

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

LongArray

public LongArray(int capacity)

Creates a new LongArray with the given initial capacity.

LongArray

public LongArray(long[] array)

Methods

clear

public void clear()

Sets this LongArray empty.

clone

public Object clone()

A-853
contains

public boolean contains(long value)

Returns true if the given value is contained in this LongArray.

add

public void add(long value)

Appends the given long to the LongArray's data. NOTE: Expected O(1), Worst case O(n) complexity ( resize )

add

public void add(long[] values)

Appends the given data to the LongArray's data. If size is currently 0, the values given are cloned. NOTE: Expected O(1),

Worst case O(n) complexity ( resize )

main

public static void main(String[] args)

Performs a thorough test of the LongArray's functionality.

indexOf

public int indexOf(long value)

Retrieves the index of the first occurance of the given value in this LongArray.

remove

public void remove(int index)

Removes the long at the given index.

NOTE: O(n) complexity.

get

public long get(int index)

Returns the value of the long at the given index. NOTE: O(1) complexity.

set

public void set(int index,

 long value)

Sets the given value at the given index.

A-854
size

public final int size()

Returns the number of ints stored in this LongArray

capacity

public final int capacity()

Returns this LongArray's current capacity.

sort

public void sort()

Sorts this LongArray via java.util.Arrays.sort(). First calls trimToSize().

trimToSize

public void trimToSize()

Trims the capacity of this LongArray instance to be the list's current size. An application can use this operation to minimize the

storage of an LongArray instance.

toArray

public long[] toArray()

Returns an long array containing only the used elements of this LongArray.

NOTE: This is a defensive copy, even if sizes match.

A-855
com.cafean.Number

Class Real

java.lang.Object

 |

 +-com.cafean.Number.BaseNumber

 |

 +-com.cafean.Number.Real

public class Real

extends BaseNumber

implements Cloneable, Cloneable, Comparable, java.awt.datatransfer.Transferable

Real is base class for all ModelEditor floating point numbers.

All Implemented Interfaces:

java.awt.datatransfer.Transferable, Comparable, Cloneable, Cloneable

Direct Known Subclasses:

Time, Dimless, Angle

Field Summary

public static final Unknown

Value: -1.0E30

Fields inherited from class com.cafean.Number.BaseNumber

BRITISH, SI, UNIT_NAMES

Constructor Summary

public Real()

Creates a new instance of Real with an unknown value.

public Real(double aDouble)

Creates a new instance of Real initialized to a value.

public Real(Real aReal)

Creates a new instance of Real by copying another.

Method Summary

Real abs()

Real add(double aDouble)

Real add(Real aReal)

A-856
static boolean arraysEqual(Real[] a, Real[] b)

Object clone()

int compareTo(Object o)

void convert(double d)

Converts the double given into the global units, and sets the result as the value of this Real.

void convert(double d, int unitType)

Converts the double given into the units requested, and sets the result as the value for this Real.

void convert(Number n)

Converts the doubleValue of the Number given to the global units.

void convert(String aString)

Converts the String given into the global units, and sets the result as the value for this Real.

void convert(String aString, int unitType)

Converts the String given into the units requested, and sets the result as the value for this Real.

Real divide(double aDouble)

Real divide(Real aReal)

Real divideby(double aDouble)

Real divideby(Real aReal)

boolean equals(double aDouble)

static boolean equals(double a, double b)

Returns true if the given doubles differ by less than 5E-9.

static boolean equals(double a, double b, double delta)

Returns true if the given doubles differ by less than the given ( a + b ) * delta.

boolean equals(Object o)

boolean equals(Real aReal)

NOTE: This does not get called instead of Object.equals

double getConversionFactor()

Retrieves the conversion factor used to convert this Real's value from SI to British units.

double getCurrentDisplayValue(int unittypes)

Returns the value to display.

double getDataValue()

This is a root value getter.

A-857
String getDisplayName()

Retrieves a Display name for this unit.

double getDoubleValue()

Returns the numerical value of this Real in SI units.

String getENG_Units()

Retrieves a String representation of this Real's English unit type.

java.text.DecimalForm

at

getFormat(double value)

String getHtmlUnits()

Returns the current global units formated for HTML

String getHtmlUnits(int units)

Returns the units requested formated for HTML.

java.text.DecimalForm

at

getLoadFormat(double value)

Decides what DecimalFormat to use to display the given value in 12 characters.

String getName()

Returns the name of this Real.

static double getReferencedValue(double value)

String getSI_Units()

Retrieves a String representation of this Real's SI unit type.

int getSignificantFigs()

Getter for property significantFigs.

static double getStrippedValue(double value)

Object getTransferData(java.awt.datatransfer.DataFlavor flavor)

Returns an object which represents the data to be transferred.

java.awt.datatransfer

.DataFlavor[]

getTransferDataFlavors()

Returns an array of DataFlavor objects indicating the flavors the data can be provided in.

String getUnitName()

Returns the name of this Real value

String getUnits(int units)

Returns this real's units in the given format.

double getValue()

Returns the current value of this Real in SI units.

boolean greaterthan(double aDouble)

boolean greaterthan(Real aReal)

A-858
boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)

Returns whether or not the specified data flavor is supported for this object.

boolean isKnown()

Return true if the value if known, otherwise return false.

boolean isUnknown()

Determines whether this value has been specified to a value or is not a number.

boolean lessthan(double aDouble)

boolean lessthan(Real aReal)

static void lockToString(Thread t)

Locks Real's toString() method for use only by the given thread.

Real multiply(double aDouble)

Real multiply(Real aReal)

static void normalizeArray(Real[] array)

void restoreState(String prefix, Hashtable state)

Restore the state of the Real from an earlier edit.

void setDataValue(double val_)

This is a root value getter.

void setSignificantFigs(int significantFigs)

Setter for property significantFigs.

void setUnknown()

void setValue(BaseNumber a)

void setValue(double aDouble)

Sets the current value of this Real.

void setValue(Number n)

void setValue(UserDefinedValue input)

Sets the current value to a reference to a given UserDefinedValue.

static void sortParallelRealArrays(Real[][] arrays)

Sorts the given parallel arrays by the values in the first array.

Real sqrt()

void storeState(String prefix, Hashtable state)

Store the state of the Real to permit undo.

A-859
Real subtract(double aDouble)

Real subtract(Real aReal)

String toLoadString()

Returns a formated string for this Real in the current global units that is limited to 12

characters in length.

String toLoadString(int unitType)

Returns a formated string for this Real in the requested units that is limited to 12 characters in

length.

String toString()

String toString(int unitType)

Returns a formated string containing the current value of this Real.

static void unlockToString()

Unlocks toString() to be used by any thread.

Methods inherited from class com.cafean.Number.BaseNumber

clone, compareDouble, convert, getENG_Units, getFormat, getSI_Units, getUnits,

getUnitType, isKnown, isUnknown, setKnown, setUnitType, setUnknown, setValue, setValue,

toString

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.lang.Comparable

compareTo

Methods inherited from interface java.awt.datatransfer.Transferable

getTransferData, getTransferDataFlavors, isDataFlavorSupported

Fields

Unknown

public static final double Unknown

Constant value: -1.0E30

Constructors

A-860
Real

public Real()

Creates a new instance of Real with an unknown value.

Real

public Real(double aDouble)

Creates a new instance of Real initialized to a value.

Parameters:

aDouble - The floating point value represented by this real.

Real

public Real(Real aReal)

Creates a new instance of Real by copying another.

Parameters:

aReal - The Real being copied.

Methods

lockToString

public static void lockToString(Thread t)

Locks Real's toString() method for use only by the given thread.

unlockToString

public static void unlockToString()

Unlocks toString() to be used by any thread.

getConversionFactor

public double getConversionFactor()

Retrieves the conversion factor used to convert this Real's value from SI to British units.

getDisplayName

public String getDisplayName()

Retrieves a Display name for this unit.

getSI_Units

public String getSI_Units()

A-861
Retrieves a String representation of this Real's SI unit type.

getENG_Units

public String getENG_Units()

Retrieves a String representation of this Real's English unit type.

getHtmlUnits

public String getHtmlUnits()

Returns the current global units formated for HTML

getHtmlUnits

public String getHtmlUnits(int units)

Returns the units requested formated for HTML.

Parameters:

units - the unit type requested.

getUnits

public String getUnits(int units)

Returns this real's units in the given format.

setValue

public void setValue(Number n)

setValue sets the object to a value without unit type conversion.

setValue

public void setValue(BaseNumber a)

setValue sets the object to a value from another BaseNumber.

setValue

public void setValue(double aDouble)

Sets the current value of this Real.

setValue

public void setValue(UserDefinedValue input)

Sets the current value to a reference to a given UserDefinedValue.

A-862
convert

public void convert(Number n)

Converts the doubleValue of the Number given to the global units. The result of the conversion is set as the current value of

this Real.

convert

public void convert(String aString)

Converts the String given into the global units, and sets the result as the value for this Real.

convert

public void convert(String aString,

 int unitType)

Converts the String given into the units requested, and sets the result as the value for this Real.

convert

public void convert(double d)

Converts the double given into the global units, and sets the result as the value of this Real.

convert

public void convert(double d,

 int unitType)

Converts the double given into the units requested, and sets the result as the value for this Real.

getValue

public double getValue()

Returns the current value of this Real in SI units. If this Real refers to a UserDefinedValue, this will return the reference.

getDoubleValue

public double getDoubleValue()

Returns the numerical value of this Real in SI units. If this Real uses a UserDefinedValue, the numerical value of that

UserDefinedValue is returned. This method should be used for mathmatical functions.

getFormat

public java.text.DecimalFormat getFormat(double value)

Return the format used to represent a value.

A-863
toString

public String toString()

toString translates the internal value to a string in the current unit type.

getLoadFormat

public java.text.DecimalFormat getLoadFormat(double value)

Decides what DecimalFormat to use to display the given value in 12 characters.

toLoadString

public String toLoadString()

Returns a formated string for this Real in the current global units that is limited to 12 characters in length. The format is chosen

so that no numerical precision is lost through this formatting.

toLoadString

public String toLoadString(int unitType)

Returns a formated string for this Real in the requested units that is limited to 12 characters in length. The format is chosen so

that no numerical precision is lost through this formatting.

getUnitName

public String getUnitName()

Returns the name of this Real value

toString

public String toString(int unitType)

Returns a formated string containing the current value of this Real. If this real uses a user defined numeric, the name of that

numeric is returned unless the current mode is MODE_EXPORT_ASCII. The units for the formated string are passed in.

getCurrentDisplayValue

public double getCurrentDisplayValue(int unittypes)

Returns the value to display. This gets the numerical value and converts it if the given unittype is BRITISH.

clone

public Object clone()

setUnknown

public void setUnknown()

A-864
Set the unknown flag to true.

compareTo

public int compareTo(Object o)

equals

public boolean equals(Object o)

equals

public boolean equals(Real aReal)

NOTE: This does not get called instead of Object.equals

equals

public boolean equals(double aDouble)

equals

public static boolean equals(double a,

 double b)

Returns true if the given doubles differ by less than 5E-9.

equals

public static boolean equals(double a,

 double b,

 double delta)

Returns true if the given doubles differ by less than the given ( a + b ) * delta.

lessthan

public boolean lessthan(Real aReal)

lessthan

public boolean lessthan(double aDouble)

A-865
greaterthan

public boolean greaterthan(Real aReal)

greaterthan

public boolean greaterthan(double aDouble)

arraysEqual

public static boolean arraysEqual(Real[] a,

 Real[] b)

add

public Real add(Real aReal)

add

public Real add(double aDouble)

subtract

public Real subtract(Real aReal)

subtract

public Real subtract(double aDouble)

multiply

public Real multiply(Real aReal)

multiply

public Real multiply(double aDouble)

A-866
divideby

public Real divideby(Real aReal)

divide

public Real divide(Real aReal)

divideby

public Real divideby(double aDouble)

divide

public Real divide(double aDouble)

sqrt

public Real sqrt()

abs

public Real abs()

getStrippedValue

public static double getStrippedValue(double value)

getReferencedValue

public static double getReferencedValue(double value)

getTransferDataFlavors

public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()

A-867
Returns an array of DataFlavor objects indicating the flavors the data can be provided in. The array should be ordered

according to preference for providing the data (from most richly descriptive to least descriptive).

Returns:

an array of data flavors in which this data can be transferred

isDataFlavorSupported

public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)

Returns whether or not the specified data flavor is supported for this object.

Parameters:

flavor - the requested flavor for the data

Returns:

boolean indicating whether or not the data flavor is supported

getTransferData

public Object getTransferData(java.awt.datatransfer.DataFlavor flavor)

 throws java.awt.datatransfer.UnsupportedFlavorException,

 java.io.IOException

Returns an object which represents the data to be transferred. The class of the object returned is defined by the representation

class of the flavor.

Parameters:

flavor - the requested flavor for the data

Throws:

IOException - if the data is no longer available in the requested flavor.

UnsupportedFlavorException - if the requested data flavor is not supported.

See Also:

DataFlavor.getRepresentationClass()

getSignificantFigs

public int getSignificantFigs()

Getter for property significantFigs.

Returns:

Value of property significantFigs.

setSignificantFigs

public void setSignificantFigs(int significantFigs)

Setter for property significantFigs.

Parameters:

significantFigs - New value of property significantFigs.

A-868
sortParallelRealArrays

public static void sortParallelRealArrays(Real[][] arrays)

Sorts the given parallel arrays by the values in the first array.

normalizeArray

public static void normalizeArray(Real[] array)

isUnknown

public boolean isUnknown()

Determines whether this value has been specified to a value or is not a number.

isKnown

public boolean isKnown()

Return true if the value if known, otherwise return false.

Returns:

true if the value if known, otherwise return false.

storeState

public void storeState(String prefix,

 Hashtable state)

Store the state of the Real to permit undo.

Parameters:

state - a Hashtable containing modified parameters.

prefix - a String containing the prefix for hash entries.

restoreState

public void restoreState(String prefix,

 Hashtable state)

Restore the state of the Real from an earlier edit.

Parameters:

state - a Hashtable containing modified parameters.

prefix - a String containing the prefix for hash entries.

getName

public String getName()

A-869
Returns the name of this Real.

getDataValue

public final double getDataValue()

This is a root value getter. This performs no error checking, or modifications to value before returning.

setDataValue

public final void setDataValue(double val_)

This is a root value getter. This performs no error checking, or modifications to value before setting the value.

A-870
com.cafean.Number

Class Time

java.lang.Object

 |

 +-com.cafean.Number.BaseNumber

 |

 +-com.cafean.Number.Real

 |

 +-com.cafean.Number.Time

public class Time

extends Real

A representation of time in seconds. English Units: s, SI Units: s. 

All Implemented Interfaces:

Cloneable, java.awt.datatransfer.Transferable, Comparable, Cloneable

Fields inherited from class com.cafean.Number.Real

Unknown

Fields inherited from class com.cafean.Number.BaseNumber

BRITISH, SI, UNIT_NAMES

Constructor Summary

public Time()

public Time(double d)

Method Summary

double getConversionFactor()

String getENG_Units()

java.text.DecimalForm

at

getFormat(double value)

String getSI_Units()

static Time[] makeArray(double[] dArray)

static Time[] makeArray(Vector vector)

A-871
Methods inherited from class com.cafean.Number.Real

abs, add, add, arraysEqual, clone, compareTo, convert, convert, convert, convert,

convert, divide, divide, divideby, divideby, equals, equals, equals, equals, equals,

getConversionFactor, getCurrentDisplayValue, getDataValue, getDisplayName,

getDoubleValue, getENG_Units, getFormat, getHtmlUnits, getHtmlUnits, getLoadFormat,

getName, getReferencedValue, getSI_Units, getSignificantFigs, getStrippedValue,

getTransferData, getTransferDataFlavors, getUnitName, getUnits, getValue, greaterthan,

greaterthan, isDataFlavorSupported, isKnown, isUnknown, lessthan, lessthan,

lockToString, multiply, multiply, normalizeArray, restoreState, setDataValue,

setSignificantFigs, setUnknown, setValue, setValue, setValue, setValue,

sortParallelRealArrays, sqrt, storeState, subtract, subtract, toLoadString,

toLoadString, toString, toString, unlockToString

Methods inherited from class com.cafean.Number.BaseNumber

clone, compareDouble, convert, getENG_Units, getFormat, getSI_Units, getUnits,

getUnitType, isKnown, isUnknown, setKnown, setUnitType, setUnknown, setValue, setValue,

toString

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.lang.Comparable

compareTo

Methods inherited from interface java.awt.datatransfer.Transferable

getTransferData, getTransferDataFlavors, isDataFlavorSupported

Constructors

Time

public Time()

Time

public Time(double d)

Methods

A-872
getConversionFactor

public double getConversionFactor()

Retrieves the conversion factor used to convert this Real's value from SI to British units.

getSI_Units

public String getSI_Units()

Retrieves a String representation of this Real's SI unit type.

getENG_Units

public String getENG_Units()

Retrieves a String representation of this Real's English unit type.

makeArray

public static Time[] makeArray(double[] dArray)

makeArray

public static Time[] makeArray(Vector vector)

getFormat

public java.text.DecimalFormat getFormat(double value)

Return the format used to represent a value.

A-873
com.cafean.Number

Class ValueOutOfRangeException

java.lang.Object

 |

 +-java.lang.Throwable

 |

 +-java.lang.Exception

 |

 +-com.cafean.Number.ValueOutOfRangeException

public class ValueOutOfRangeException

extends Exception

An Exception representing a checked value that is outside of its acceptable range.

All Implemented Interfaces:

java.io.Serializable

Constructor Summary

public ValueOutOfRangeException()

Creates a new ValueOutOfRangeException with no message

public ValueOutOfRangeException(String message)

Creates a new ValueOutOfRangeException with the given message

public ValueOutOfRangeException(String name, int minVal, int maxVal, int val)

Creates a new ValueOutOfRangeException with the given values.

public ValueOutOfRangeException(String name, double minVal, double maxVal,

double val)

Creates a new ValueOutOfRangeException with the given values.

public ValueOutOfRangeException(String s, Real minVal, Real maxVal, Real val)

Creates a new ValueOutOfRangeException with the given values.

Methods inherited from class java.lang.Throwable

fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause,

printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

A-874
ValueOutOfRangeException

public ValueOutOfRangeException()

Creates a new ValueOutOfRangeException with no message

ValueOutOfRangeException

public ValueOutOfRangeException(String message)

Creates a new ValueOutOfRangeException with the given message

Parameters:

message - a String containing the message for this exception.

ValueOutOfRangeException

public ValueOutOfRangeException(String name,

 int minVal,

 int maxVal,

 int val)

Creates a new ValueOutOfRangeException with the given values.

Parameters:

name - a String containing the name of the value that is out of range.

minVal - the minimum value of the checked range.

maxVal - the maximum value of the checked range.

val - the value checked.

ValueOutOfRangeException

public ValueOutOfRangeException(String name,

 double minVal,

 double maxVal,

 double val)

Creates a new ValueOutOfRangeException with the given values.

Parameters:

name - a String containing the name of the value that is out of range.

minVal - the minimum value of the checked range.

maxVal - the maximum value of the checked range.

val - the value checked.

ValueOutOfRangeException

public ValueOutOfRangeException(String s,

 Real minVal,

Real maxVal,

Real val)

Creates a new ValueOutOfRangeException with the given values.

Parameters:

A-875
name - a String containing the name of the value that is out of range.

minVal - a Real containing the minimum value of the checked range.

maxVal - a Real containing the maximum value of the checked range.

val - the Real value checked.

A-876
Package

com.cafean.utils

A-877
com.cafean.utils

Class Configurator

java.lang.Object

 |

 +-com.cafean.utils.Configurator

public class Configurator

extends Object

A utility class for maintaining a set of properties sorted by module and stored in an XML file in the current user's home directory. 

Settings are organized by Module, which indicates which application a particular setting is for. This allows for different packages to

use the same setting name without overwritting each other's data.

The most commonly used methods are save(), getGeometry(String, Window), and setGeometry(String, Window).

Direct Known Subclasses:

SnapPreferences

Constructor Summary

public Configurator()

Creates a instance of Configurator and loads in configuration data from either $HOME/.snaprc

or a blank copy.

public Configurator(String module)

Creates a instance of Configurator and loads in configuration data from either $HOME/.snaprc

or a blank copy.

Method Summary

boolean addCodeInfos(CodeInfo s)

Adds a CodeInfo server to the ExecutionMonitor module list.

boolean addServer(Server s)

Adds a calculation server to the global module.

void destroy()

Cleans up all object references inside Configurator.

Vector getCodeInfos()

Retrieves the list of codeinfo's from the ExecutionMonitor module.

java.awt.Color getColor(String name)

Retrieves the color stored with the given name from the current module.

java.awt.Color getColor(String name, java.awt.Color def)

Retrieves the color stored with the given name from the current module.

java.awt.Color getColor(String moduleName, String name)

Retrieves the color stored with the given name from the current module.

A-878
java.awt.Color getColor(String moduleName, String name, java.awt.Color def)

Retrieves the color stored with the given name from the current module.

String getConfigFileDir()

Gets the full path from to the directory that contains the .snaprc file.

String getConfigFileName()

Retrieves the name and location of this Configurator's config file.

void getDividerLocation(String name, JSplitPane pane, int location)

Loads the divider location stored under the given keyword in the current module to the

javax.swing.JSplitPane provided.

void getDividerLocation(String moduleName, String name, JSplitPane pane, int

location)

Loads the divider location stored under the given keyword in the given module to the

javax.swing.JSplitPane provided.

java.awt.Font getFont(String name)

Retreives the font stored with the given name inside the current module.

java.awt.Font getFont(String name, String family, String size, String style)

Retrieves a named Font from the current module.

java.awt.Font getFont(String moduleName, String name, String family, String size,

String style)

Retrieves a named Font from the current module.

void getGeometry(String windowName, javax.help.HelpBroker broker)

Loads the geometry for a specified help window in the current module from the SNAP Config

file into the javax.help.HelpBroker provided.

void getGeometry(String windowName, javax.help.HelpBroker broker, int height,

int width)

Loads the geometry for a specified help window in the current module from the SNAP Config

file into the javax.help.HelpBroker provided.

void getGeometry(String moduleName, String windowName, javax.help.HelpBroker

broker, int height, int width)

Loads the geometry for a specified help window in the current module from the SNAP Config

file into the javax.help.HelpBroker provided.

void getGeometry(String moduleName, String windowName, java.awt.Window frame,

int height, int width, int x, int y)

Loads the geometry for a specified help window in the given module from the SNAP Config

file into the frame provided.

void getGeometry(String windowName, java.awt.Window frame)

Loads the geometry for a specified help window in the current module from the SNAP Config

file into the frame provided.

void getGeometry(String windowName, java.awt.Window frame, int height, int

width)

Loads the geometry for a specified help window in the current module from the SNAP Config

file into the frame provided.

A-879
void getGeometry(String windowName, java.awt.Window frame, int height, int

width, int x, int y)

Loads the geometry for a specified help window in the current module from the SNAP Config

file into the frame provided.

Server getLocalServer()

retrieves an appropriate Server instance for contacting the local instance of the Calculation

Server

Server getNrcDBServer()

Retrieves the NRC Databank server information from the Global module.

String getProperty(String propertyName)

Retrieves a named property from the current module.

String getProperty(String name, String def)

Retrieves a named property from the current module.

String getProperty(String moduleName, String propertyName, String def)

Retrieves a named property from the given module without affecting the current module

setting.

LinkedList getServers()

Retrieves the list of servers from the Global module.

WebSupport getWebSupport()

Retrieves the Web support configuration from the Global module.

static boolean reDirectStdErrOut(String prefix)

Redirects stderr & stdout to a file in the users $HOME/.snap/ directory named

[prefix].screen.

void removeAllCodeInfos()

Removes all CodeInfo from the ExecutionMonitor module list in preperation for re-creating

the list from a modified copy.

void removeAllServers()

Removes all calculation server entitys from the global list preperation for re-creating the list

from a modified copy.

void removeProperty(String name)

Removes the property with the given name from the current module.

void removeProperty(String moduleName, String name)

Removes the property with the given name from the given module.

boolean removeServer(String name)

Removes a calculation server from the Global module.

boolean save()

Saves the currently loaded configuration to the user's .snaprc.

void setColor(String name, java.awt.Color color)

Stores the given java.awt.Color with the the given name inside the current module.

A-880
void setColor(String moduleName, String name, java.awt.Color color)

Stores the given java.awt.Color with the the given name inside the current module.

void setDividerLocation(String keyword, JSplitPane pane)

Saves the divider location for the given javax.swing.JSplitPane under the given keyword

in the current module to the SNAP Config file.

void setDividerLocation(String moduleName, String keyword, JSplitPane pane)

Saves the divider location for the given javax.swing.JSplitPane under the given keyword

in the given module to the SNAP Config file.

void setFont(String name, java.awt.Font font)

Stores the given font with the the given name inside the current module.

void setFont(String moduleName, String name, java.awt.Font font)

Stores the given font with the the given name inside the current module.

void setGeometry(String windowName, javax.help.HelpBroker broker)

Saves the geometry for a specified help window in the current module to the SNAP Config file

from the javax.help.HelpBroker provided.

void setGeometry(String moduleName, String windowName, java.awt.Window frame)

Saves the geometry for a specified window in the current module to the SNAP Config file from

the frame provided.

void setGeometry(String windowName, java.awt.Window frame)

Saves the geometry for a specified window in the current module to the SNAP Config file from

the frame provided.

void setLookAndFeel(String lafStr)

Deprecated. 0.26.1

void setModule(String moduleName)

Sets the Configurator's current module to the one provided.

void setNrcDBServer(Server s)

Sets the given NRC Databank Server info into the Global module.

void setProperty(String name, String propertyValue)

Assigns a property to be saved under the given name inside the current module.

void setProperty(String moduleName, String name, String propertyValue)

Assigns a property to be saved under the given name inside the given module.

void setWebSupport(WebSupport s)

Sets the given Web support configuration into the Global module.

int updateAvailable(String application)

Retrieves an XML document from the SNAP web server and compares version information

contained in the document with current version information.

void updateLookAndFeel()

Updates the current look and feel to use the currently selected L&F based on the "Use System

Look And Feel" property.

Methods inherited from class java.lang.Object

A-881
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

Configurator

public Configurator()

Creates a instance of Configurator and loads in configuration data from either $HOME/.snaprc or a blank copy. Also sets the

current module to "Global".

Configurator

public Configurator(String module)

Creates a instance of Configurator and loads in configuration data from either $HOME/.snaprc or a blank copy. This sets the

current module to the given value.

Parameters:

module - a String containing the module to set initially.

Methods

getConfigFileName

public String getConfigFileName()

Retrieves the name and location of this Configurator's config file.

getConfigFileDir

public String getConfigFileDir()

Gets the full path from to the directory that contains the .snaprc file.

Returns:

the full path to the .snap directory.

save

public boolean save()

Saves the currently loaded configuration to the user's .snaprc. Only modules that have data that changed are saved.

Returns:

the boolean success or failure of the save.

destroy

public void destroy()

A-882
Cleans up all object references inside Configurator. This is done to clear up the memory used by the Configurator.

setModule

public void setModule(String moduleName)

Sets the Configurator's current module to the one provided. If this module isn't found in the configuration file, a blank one is

created.

Parameters:

moduleName - the String containing the name of the desired module.

setGeometry

public void setGeometry(String windowName,

 javax.help.HelpBroker broker)

Saves the geometry for a specified help window in the current module to the SNAP Config file from the

javax.help.HelpBroker provided.

Parameters:

windowName - the String that contains the keyword to save the data under. For example: Veda's main window's keyword

is "main."

broker - the HelpBroker to save geometry from.

setGeometry

public void setGeometry(String windowName,

 java.awt.Window frame)

Saves the geometry for a specified window in the current module to the SNAP Config file from the frame provided.

Parameters:

windowName - the String that contains the keyword to save the data under. For example: Veda's main window's keyword

is "main."

frame - the java.awt.Frame (or derivative) to save geometry from.

setGeometry

public void setGeometry(String moduleName,

 String windowName,

 java.awt.Window frame)

Saves the geometry for a specified window in the current module to the SNAP Config file from the frame provided.

Parameters:

moduleName - the String containing the name of the desired module.

windowName - the String that contains the keyword to save the data under.

frame - the java.awt.Frame (or derivative) to save geometry from.

getGeometry

public void getGeometry(String windowName,

 javax.help.HelpBroker broker)

A-883
Loads the geometry for a specified help window in the current module from the SNAP Config file into the

javax.help.HelpBroker provided. If no geometry is loaded, or an exception results, the broker is set to 640x480 at the

center of the screen.

Parameters:

moduleName - the String containing the name of the desired module.

windowName - the String that contains the keyword the data was saved under.

broker - the HelpBroker to retrieve geometry for.

getGeometry

public void getGeometry(String windowName,

 javax.help.HelpBroker broker,

 int height,

 int width)

Loads the geometry for a specified help window in the current module from the SNAP Config file into the

javax.help.HelpBroker provided. If no geometry is loaded, or an exception results, the broker is set to the given default

dimensions at the center of the screen.

Parameters:

windowName - the String that contains the keyword the data was saved under.

broker - the HelpBroker to retrieve geometry for.

height - the default Height for the broker if none is found

width - the default width for the broker if none is found

getGeometry

public void getGeometry(String moduleName,

 String windowName,

 javax.help.HelpBroker broker,

 int height,

 int width)

Loads the geometry for a specified help window in the current module from the SNAP Config file into the

javax.help.HelpBroker provided. If no geometry is loaded, or an exception results, the broker is set to the given default

dimensions at the center of the screen.

Parameters:

moduleName - the String containing the name of the desired module.

windowName - the String that contains the keyword the data was saved under.

broker - the HelpBroker to retrieve geometry for.

height - the default Height for the broker if none is found

width - the default width for the broker if none is found

getGeometry

public void getGeometry(String windowName,

 java.awt.Window frame)

Loads the geometry for a specified help window in the current module from the SNAP Config file into the frame provided. If

no geometry is loaded, or an exception results, the broker is set to 640x480 at the center of the screen.

Parameters:

windowName - the String that contains the keyword the data was saved under. For example: Veda's main window's

keyword is "main."

frame - the java.awt.Window to retrieve geometry for.

A-884
getGeometry

public void getGeometry(String windowName,

 java.awt.Window frame,

 int height,

 int width,

 int x,

 int y)

Loads the geometry for a specified help window in the current module from the SNAP Config file into the frame provided. If

no geometry is loaded, or an exception results, the frame is set to the given default dimensions at the center of the screen.

Parameters:

windowName - the String that contains the keyword the data was saved under.

frame - the java.awt.Window to retrieve geometry for.

height - the default Height for the frame if none is found

width - the default width for the frame if none is found

getGeometry

public void getGeometry(String moduleName,

 String windowName,

 java.awt.Window frame,

 int height,

 int width,

 int x,

 int y)

Loads the geometry for a specified help window in the given module from the SNAP Config file into the frame provided. If no

geometry is loaded, or an exception results, the frame is set to the given default dimensions at the center of the screen.

Parameters:

moduleName - the String containing the name of the desired module.

windowName - the String that contains the keyword the data was saved under.

frame - the java.awt.Window to retrieve geometry for.

height - the default Height for the frame if none is found

width - the default width for the frame if none is found

getGeometry

public void getGeometry(String windowName,

 java.awt.Window frame,

 int height,

 int width)

Loads the geometry for a specified help window in the current module from the SNAP Config file into the frame provided. If

no geometry is loaded, or an exception results, the frame is set to the given default dimensions at the center of the screen.

Parameters:

windowName - the String that contains the keyword the data was saved under.

frame - the java.awt.Window to retrieve geometry for.

height - the default Height for the frame if none is found

width - the default width for the frame if none is found

A-885
setDividerLocation

public void setDividerLocation(String keyword,

 JSplitPane pane)

Saves the divider location for the given javax.swing.JSplitPane under the given keyword in the current module to the

SNAP Config file.

Parameters:

keyword - the String that contains the keyword the data was saved under.

pane - the JSplitPane (or derivative).

setDividerLocation

public void setDividerLocation(String moduleName,

 String keyword,

 JSplitPane pane)

Saves the divider location for the given javax.swing.JSplitPane under the given keyword in the given module to the

SNAP Config file.

Parameters:

moduleName - the String containing the name of the desired module.

keyword - the String that contains the keyword the data was saved under.

pane - the JSplitPane (or derivative).

getDividerLocation

public void getDividerLocation(String name,

 JSplitPane pane,

 int location)

Loads the divider location stored under the given keyword in the current module to the javax.swing.JSplitPane provided.

If the divider location is not found, it will be set to the given default value.

Parameters:

name - a String containing the name of the divider.

pane - the JSplitPane to retrieve a divider location for.

location - the default location.

getDividerLocation

public void getDividerLocation(String moduleName,

 String name,

 JSplitPane pane,

 int location)

Loads the divider location stored under the given keyword in the given module to the javax.swing.JSplitPane provided.

If the divider location is not found, it will be set to the given default value.

Parameters:

moduleName - the String containing the name of the desired module.

name - a String containing the name of the divider.

pane - the JSplitPane to retrieve a divider location for.

location - the default location.

A-886
setProperty

public void setProperty(String name,

 String propertyValue)

Assigns a property to be saved under the given name inside the current module. If the property already exists inside that

module, the data already stored gets overwritten by the new value.

Parameters:

name - the String that contains the name of the property to be saved

propertyValue - the value to assign to the given property

setProperty

public void setProperty(String moduleName,

 String name,

 String propertyValue)

Assigns a property to be saved under the given name inside the given module. If the property already exists inside that module,

the data already stored gets overwritten by the new value.

Parameters:

moduleName - the String containing the name of the desired module.

name - the String that contains the name of the property to be saved

propertyValue - the value to assign to the given property

removeProperty

public void removeProperty(String name)

Removes the property with the given name from the current module.

removeProperty

public void removeProperty(String moduleName,

 String name)

Removes the property with the given name from the given module.

getColor

public java.awt.Color getColor(String name,

 java.awt.Color def)

Retrieves the color stored with the given name from the current module. If no color is found with the given name, the default

value is returned.

Parameters:

name - a String containing the name of the desired color.

def - the Color to return if no Color is found.

Returns:

the Color stored with the given name, or def, if no such color is found.

A-887
getColor

public java.awt.Color getColor(String moduleName,

 String name,

 java.awt.Color def)

Retrieves the color stored with the given name from the current module. If no color is found with the given name, the default

value is returned.

Parameters:

moduleName - a String containing the name of the module.

name - a String containing the name of the desired color.

def - the Color to return if no Color is found.

Returns:

the Color stored with the given name, or def, if no such color is found.

getColor

public java.awt.Color getColor(String name)

Retrieves the color stored with the given name from the current module.

Parameters:

name - a String containing the name of the desired color.

Returns:

the Color stored with the given name, or def, if no such color is found.

getColor

public java.awt.Color getColor(String moduleName,

 String name)

Retrieves the color stored with the given name from the current module.

Parameters:

moduleName - a String containing the name of the module.

name - a String containing the name of the desired color.

Returns:

the Color stored with the given name, or def, if no such color is found.

setColor

public void setColor(String name,

 java.awt.Color color)

Stores the given java.awt.Color with the the given name inside the current module. Colors are stored by storing the RGB

value as a string inside the .snaprc file. If a property already exists with the given name, the given Color's RGB replaces the

current data.

Parameters:

name - a String containing the name of the desired color.

color - the Color to store. If this Color is null, nothing is saved.

A-888
setColor

public void setColor(String moduleName,

 String name,

 java.awt.Color color)

Stores the given java.awt.Color with the the given name inside the current module. Colors are stored by storing the RGB

value as a string inside the .snaprc file. If a property already exists with the given name, the given Color's RGB replaces the

current data.

Parameters:

moduleName - a String containing the name of the module.

name - a String containing the name of the desired color.

color - the Color to store. If this Color is null, nothing is saved.

setFont

public void setFont(String name,

 java.awt.Font font)

Stores the given font with the the given name inside the current module. Fonts are stored by saving the Font's Family, Size

and Style strings to the .snaprc. If a Fonat already exists with the the given name, the stored data will be replaced with the new

data.

Parameters:

name - the String that contains the name of the given font

font - the Font to store family, size and style data for.

setFont

public void setFont(String moduleName,

 String name,

 java.awt.Font font)

Stores the given font with the the given name inside the current module. Fonts are stored by saving the Font's Family, Size

and Style strings to the .snaprc. If a Fonat already exists with the the given name, the stored data will be replaced with the new

data.

Parameters:

moduleName - a String containing the name of the module.

name - the String that contains the name of the given font

font - the Font to store family, size and style data for.

getFont

public java.awt.Font getFont(String name)

Retreives the font stored with the given name inside the current module. If there is no font stored with that name a

monospaced font size 12 will be returned instead.

Parameters:

name - the String that contains the name of the desired font.

Returns:

a Font containing the requested property value; If no Font with the given name is stored, monospaced size 12 with a style

of 0 will be returned.

A-889
getFont

public java.awt.Font getFont(String name,

 String family,

 String size,

 String style)

Retrieves a named Font from the current module.

Parameters:

name - the name of the requested Font

family - the default family attribute of the requested Font

size - the default size attribute of the requested Font

style - the default style attribute of the requested Font

Returns:

a Font containing the requested property value; If no Font with the given name is stored, the default values are used.

getFont

public java.awt.Font getFont(String moduleName,

 String name,

 String family,

 String size,

 String style)

Retrieves a named Font from the current module.

Parameters:

moduleName - a String containing the name of the module.

name - the name of the requested Font

family - the default family attribute of the requested Font

size - the default size attribute of the requested Font

style - the default style attribute of the requested Font

Returns:

a Font containing the requested property value; If no Font with the given name is stored, the default values are used.

getCodeInfos

public Vector getCodeInfos()

Retrieves the list of codeinfo's from the ExecutionMonitor module.

Returns:

a java.util.Vector of com.cafean.utils.CodeInfo enumerating the executables defined for each code plugin; will never be

null;

removeAllCodeInfos

public void removeAllCodeInfos()

Removes all CodeInfo from the ExecutionMonitor module list in preperation for re-creating the list from a modified copy.

A-890
addCodeInfos

public boolean addCodeInfos(CodeInfo s)

Adds a CodeInfo server to the ExecutionMonitor module list.

Parameters:

s - the com.cafean.utils.CodeInfo containing the codeinfo to add to the given configuration Element.

Returns:

the success or failure of the addition.

getProperty

public String getProperty(String name,

 String def)

Retrieves a named property from the current module.

Parameters:

name - the name of the requested property

def - the value to return if the specified property is not available.

Returns:

a String containing the requested property value or def if no such value is found.

getProperty

public String getProperty(String propertyName)

Retrieves a named property from the current module.

Parameters:

propertyName - the name of the requested property

Returns:

a String containing the requested property value or null if no such value is found.

getProperty

public String getProperty(String moduleName,

 String propertyName,

 String def)

Retrieves a named property from the given module without affecting the current module setting.

Parameters:

moduleName - a String containing the name of the module.

propertyName - the name of the requested property

Returns:

a String containing the requested property value or null if no such value is found.

A-891
getNrcDBServer

public Server getNrcDBServer()

Retrieves the NRC Databank server information from the Global module.

Returns:

an com.cafean.utils.Server containing the databank server info; if none found, returns a new server: ("NONE","5007","");

setNrcDBServer

public void setNrcDBServer(Server s)

Sets the given NRC Databank Server info into the Global module.

Parameters:

s - the com.cafean.utils.Server containing the databank server info to save.

Returns:

the success or failure of the insertion.

getWebSupport

public WebSupport getWebSupport()

Retrieves the Web support configuration from the Global module.

Returns:

an com.cafean.utils.WebSupport containing the databank server info; if none found, returns a default object;

setWebSupport

public void setWebSupport(WebSupport s)

Sets the given Web support configuration into the Global module.

Parameters:

s - the com.cafean.utils.WebSupport containing the connection info to save.

Returns:

the success or failure of the insertion.

removeServer

public boolean removeServer(String name)

Removes a calculation server from the Global module.

Parameters:

name - a String containing the name of the server to remove from the Global module.

Returns:

the success or failure of the removal.

A-892
getLocalServer

public Server getLocalServer()

retrieves an appropriate Server instance for contacting the local instance of the Calculation Server

getServers

public LinkedList getServers()

Retrieves the list of servers from the Global module.

Returns:

a java.util.LinkedList of com.cafean.utils.Server enumerating the server elements contained in global. will never be null;

removeAllServers

public void removeAllServers()

Removes all calculation server entitys from the global list preperation for re-creating the list from a modified copy.

addServer

public boolean addServer(Server s)

Adds a calculation server to the global module. Will not add any Server that is not "From File". (e.g. Those loaded from the

database. )

Parameters:

s - the com.cafean.utils.Server containing the server info to add to the given configuration Element.

Returns:

the success or failure of the addition.

setLookAndFeel

public void setLookAndFeel(String lafStr)

Deprecated. 0.26.1

Set the Look-and-feel for the user interface to Windows, Motif, Mac, or the Java Look and Feel.

Valid names are: Windows, Metal, Macintosh and Motif. Of these, only Metal is available on all platforms.

Parameters:

lafStr - A string identifying the new look and feel.

updateLookAndFeel

public void updateLookAndFeel()

Updates the current look and feel to use the currently selected L&F based on the "Use System Look And Feel" property.

A-893
reDirectStdErrOut

public static boolean reDirectStdErrOut(String prefix)

Redirects stderr & stdout to a file in the users $HOME/.snap/ directory named [prefix].screen.

Parameters:

prefix - a String containing the desired prefix for the .screen file.

Returns:

true for success

updateAvailable

public int updateAvailable(String application)

Retrieves an XML document from the SNAP web server and compares version information contained in the document with

current version information.

Parameters:

application - a String containing the name of the application

Returns:

1 if a newer version is available 0 if versions match -1 on network error -2 on parser error -3 on data error -4 on unknown

error

A-894
com.cafean.utils

Class OptionPane

java.lang.Object

 |

 +-java.awt.Component

 |

 +-java.awt.Container

 |

 +-javax.swing.JComponent

 |

 +-javax.swing.JOptionPane

 |

 +-com.cafean.utils.OptionPane

public class OptionPane

extends JOptionPane

OptionPane Extension of JOptionPane, overridden to center dialogs on the display if the parent is the application's mainframe.

All Implemented Interfaces:

java.io.Serializable, java.awt.MenuContainer, java.awt.image.ImageObserver, HasGetTransferHandler,

java.io.Serializable, javax.accessibility.Accessible

Fields inherited from class javax.swing.JOptionPane

CANCEL_OPTION, CLOSED_OPTION, DEFAULT_OPTION, ERROR_MESSAGE, ICON_PROPERTY,

INFORMATION_MESSAGE, INITIAL_SELECTION_VALUE_PROPERTY, INITIAL_VALUE_PROPERTY,

INPUT_VALUE_PROPERTY, MESSAGE_PROPERTY, MESSAGE_TYPE_PROPERTY, NO_OPTION, OK_CANCEL_OPTION,

OK_OPTION, OPTION_TYPE_PROPERTY, OPTIONS_PROPERTY, PLAIN_MESSAGE, QUESTION_MESSAGE,

SELECTION_VALUES_PROPERTY, UNINITIALIZED_VALUE, VALUE_PROPERTY, WANTS_INPUT_PROPERTY,

WARNING_MESSAGE, YES_NO_CANCEL_OPTION, YES_NO_OPTION, YES_OPTION

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 java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Constructor Summary

public OptionPane()

Creates a OptionPane with a test message.

A-895
public OptionPane(Object message)

Creates a instance of OptionPane to display a message using the plain-message message type

and the default options delivered by the UI.

public OptionPane(Object message, int messageType)

Creates an instance of OptionPane to display a message with the specified message type and

the default options,

public OptionPane(Object message, int messageType, int optionType)

Creates an instance of OptionPane to display a message with the specified message type and

options.

public OptionPane(Object message, int messageType, int optionType, Icon icon)

Creates an instance of OptionPane to display a message with the specified message type,

options, and icon.

public OptionPane(Object message, int messageType, int optionType, Icon icon,

Object[] options)

Creates an instance of OptionPane to display a message with the specified message type,

icon, and options.

public OptionPane(Object message, int messageType, int optionType, Icon icon,

Object[] options, Object initialValue)

Creates an instance of OptionPane to display a message with the specified message type,

icon, and options, with the initially-selected option specified.

Method Summary

JDialog createDialog(java.awt.Component parentComponent, String title)

static

java.awt.Window

getWindowForComponent(java.awt.Component parentComponent)

Returns the specified component's toplevel Frame or Dialog.

static int showConfirmDialog(java.awt.Component parentComponent, Object message)

static int showConfirmDialog(java.awt.Component parentComponent, Object message,

String title, int optionType)

static int showConfirmDialog(java.awt.Component parentComponent, Object message,

String title, int optionType, int messageType)

static int showConfirmDialog(java.awt.Component parentComponent, Object message,

String title, int optionType, int messageType, Icon icon)

static String showInputDialog(java.awt.Component parentComponent, Object message)

static String showInputDialog(java.awt.Component parentComponent, Object message,

Object initialSelectionValue)

static String showInputDialog(java.awt.Component parentComponent, Object message,

String title, int messageType)

A-896
static Object showInputDialog(java.awt.Component parentComponent, Object message,

String title, int messageType, Icon icon, Object[] selectionValues,

Object initialSelectionValue)

static String showInputDialog(Object message)

static String showInputDialog(Object message, Object initialSelectionValue)

static void showMessageDialog(java.awt.Component parentComponent, Object message)

static void showMessageDialog(java.awt.Component parentComponent, Object message,

String title, int messageType)

static void showMessageDialog(java.awt.Component parentComponent, Object message,

String title, int messageType, Icon icon)

static int showOptionDialog(java.awt.Component parentComponent, Object message,

String title, int optionType, int messageType, Icon icon, Object[]

options, Object initialValue)

Brings up a dialog with a specified icon, where the initial choice is determined by the

initialValue parameter and the number of choices is determined by the optionType

parameter.

Methods inherited from class javax.swing.JOptionPane

createDialog, createDialog, createInternalFrame, getAccessibleContext,

getDesktopPaneForComponent, getFrameForComponent, getIcon, getInitialSelectionValue,

getInitialValue, getInputValue, getMaxCharactersPerLineCount, getMessage,

getMessageType, getOptions, getOptionType, getRootFrame, getSelectionValues, getUI,

getUIClassID, getValue, getWantsInput, selectInitialValue, setIcon,

setInitialSelectionValue, setInitialValue, setInputValue, setMessage, setMessageType,

setOptions, setOptionType, setRootFrame, setSelectionValues, setUI, setValue,

setWantsInput, showConfirmDialog, showConfirmDialog, showConfirmDialog,

showConfirmDialog, showInputDialog, showInputDialog, showInputDialog, showInputDialog,

showInputDialog, showInputDialog, showInternalConfirmDialog, showInternalConfirmDialog,

showInternalConfirmDialog, showInternalConfirmDialog, showInternalInputDialog,

showInternalInputDialog, showInternalInputDialog, showInternalMessageDialog,

showInternalMessageDialog, showInternalMessageDialog, showInternalOptionDialog,

showMessageDialog, showMessageDialog, showMessageDialog, showOptionDialog, updateUI

Methods inherited from class javax.swing.JComponent

A-897
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains,

createToolTip, disable, enable, firePropertyChange, firePropertyChange,

firePropertyChange, getAccessibleContext, 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, getRootPane, getSize,

getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor,

getTransferHandler, getUIClassID, 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, 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, setVerifyInputWhenFocusTarget, setVisible,

unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet,

countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt,

getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt,

getComponentCount, getComponents, getComponentZOrder, getContainerListeners,

getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners,

getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate,

isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider,

isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint,

paintComponents, preferredSize, print, printComponents, remove, remove, removeAll,

removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot,

setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,

setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate

Methods inherited from class java.awt.Component

A-898
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener,

addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener,

addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener,

addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds,

checkImage, checkImage, contains, contains, createImage, createImage,

createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent,

doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange,

firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange,

getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline,

getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt,

getComponentAt, getComponentListeners, getComponentOrientation, getCursor,

getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys,

getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics,

getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners,

getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests,

getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen,

getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners,

getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize,

getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit,

getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate,

inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered,

isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet,

isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque,

isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list,

list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag,

mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent,

preferredSize, prepareImage, prepareImage, print, printAll, remove,

removeComponentListener, removeFocusListener, removeHierarchyBoundsListener,

removeHierarchyListener, removeInputMethodListener, removeKeyListener,

removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify,

removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint,

repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground,

setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled,

setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont,

setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize,

setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show,

size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update,

validate

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.awt.image.ImageObserver

imageUpdate

Methods inherited from interface java.awt.MenuContainer

getFont, postEvent, remove

Methods inherited from interface javax.swing.TransferHandler.HasGetTransferHandler

A-899
getTransferHandler

Methods inherited from interface javax.accessibility.Accessible

getAccessibleContext

Constructors

OptionPane

public OptionPane()

Creates a OptionPane with a test message.

OptionPane

public OptionPane(Object message)

Creates a instance of OptionPane to display a message using the plain-message message type and the default options

delivered by the UI.

Parameters:

message - the Object to display

OptionPane

public OptionPane(Object message,

 int messageType)

Creates an instance of OptionPane to display a message with the specified message type and the default options,

Parameters:

message - the Object to display

messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,

QUESTION_MESSAGE, or PLAIN_MESSAGE

OptionPane

public OptionPane(Object message,

 int messageType,

 int optionType)

Creates an instance of OptionPane to display a message with the specified message type and options.

Parameters:

message - the Object to display

messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,

QUESTION_MESSAGE, or PLAIN_MESSAGE

optionType - the options to display in the pane: DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION,

OK_CANCEL_OPTION

A-900
OptionPane

public OptionPane(Object message,

 int messageType,

 int optionType,

 Icon icon)

Creates an instance of OptionPane to display a message with the specified message type, options, and icon.

Parameters:

message - the Object to display

messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,

QUESTION_MESSAGE, or PLAIN_MESSAGE

optionType - the options to display in the pane: DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION,

OK_CANCEL_OPTION

icon - the Icon image to display

OptionPane

public OptionPane(Object message,

 int messageType,

 int optionType,

 Icon icon,

 Object[] options)

Creates an instance of OptionPane to display a message with the specified message type, icon, and options. None of the

options is initially selected.

The options objects should contain either instances of Components, (which are added directly) or Strings (which are

wrapped in a JButton). If you provide Components, you must ensure that when the Component is clicked it messages

setValue in the created OptionPane.

Parameters:

message - the Object to display

messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,

QUESTION_MESSAGE, or PLAIN_MESSAGE

optionType - the options to display in the pane: DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION,

OK_CANCEL_OPTION

icon - the Icon image to display

options - the choices the user can select

OptionPane

public OptionPane(Object message,

 int messageType,

 int optionType,

 Icon icon,

 Object[] options,

 Object initialValue)

Creates an instance of OptionPane to display a message with the specified message type, icon, and options, with the initiallyselected option specified.

Parameters:

message - the Object to display

messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,

QUESTION_MESSAGE, or PLAIN_MESSAGE

optionType - the options to display in the pane: DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION,

OK_CANCEL_OPTION

icon - the Icon image to display

A-901
options - the choices the user can select

initialValue - the choice that is initially selected; if null, then nothing will be initially selected; only meaningful if

options is used

Methods

showMessageDialog

public static void showMessageDialog(java.awt.Component parentComponent,

 Object message)

 throws java.awt.HeadlessException

showMessageDialog

public static void showMessageDialog(java.awt.Component parentComponent,

 Object message,

 String title,

 int messageType)

 throws java.awt.HeadlessException

showMessageDialog

public static void showMessageDialog(java.awt.Component parentComponent,

 Object message,

 String title,

 int messageType,

 Icon icon)

 throws java.awt.HeadlessException

showConfirmDialog

public static int showConfirmDialog(java.awt.Component parentComponent,

 Object message)

 throws java.awt.HeadlessException

showConfirmDialog

public static int showConfirmDialog(java.awt.Component parentComponent,

 Object message,

 String title,

 int optionType)

 throws java.awt.HeadlessException

A-902
showConfirmDialog

public static int showConfirmDialog(java.awt.Component parentComponent,

 Object message,

 String title,

 int optionType,

 int messageType)

 throws java.awt.HeadlessException

showConfirmDialog

public static int showConfirmDialog(java.awt.Component parentComponent,

 Object message,

 String title,

 int optionType,

 int messageType,

 Icon icon)

 throws java.awt.HeadlessException

showInputDialog

public static String showInputDialog(Object message)

 throws java.awt.HeadlessException

showInputDialog

public static String showInputDialog(Object message,

 Object initialSelectionValue)

showInputDialog

public static String showInputDialog(java.awt.Component parentComponent,

 Object message)

 throws java.awt.HeadlessException

showInputDialog

public static String showInputDialog(java.awt.Component parentComponent,

 Object message,

 Object initialSelectionValue)

A-903
showInputDialog

public static String showInputDialog(java.awt.Component parentComponent,

 Object message,

 String title,

 int messageType)

 throws java.awt.HeadlessException

showInputDialog

public static Object showInputDialog(java.awt.Component parentComponent,

 Object message,

 String title,

 int messageType,

 Icon icon,

 Object[] selectionValues,

 Object initialSelectionValue)

 throws java.awt.HeadlessException

showOptionDialog

public static int showOptionDialog(java.awt.Component parentComponent,

 Object message,

 String title,

 int optionType,

 int messageType,

 Icon icon,

 Object[] options,

 Object initialValue)

 throws java.awt.HeadlessException

Brings up a dialog with a specified icon, where the initial choice is determined by the initialValue parameter and the

number of choices is determined by the optionType parameter.

If optionType is YES_NO_OPTION, or YES_NO_CANCEL_OPTION and the options parameter is null, then the options are

supplied by the look and feel.

The messageType parameter is primarily used to supply a default icon from the look and feel.

Parameters:

parentComponent - determines the Frame in which the dialog is displayed; if null, or if the parentComponent has no

Frame, a default Frame is used

message - the Object to display

title - the title string for the dialog

optionType - an integer designating the options available on the dialog: YES_NO_OPTION, or YES_NO_CANCEL_OPTION

messageType - an integer designating the kind of message this is, primarily used to determine the icon from the

pluggable Look and Feel: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or

PLAIN_MESSAGE

icon - the icon to display in the dialog

options - an array of objects indicating the possible choices the user can make; if the objects are components, they are

rendered properly; non-String objects are rendered using their toString methods; if this parameter is null, the options

are determined by the Look and Feel

initialValue - the object that represents the default selection for the dialog; only meaningful if options is used; can

be null

Returns:

A-904
an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog

Throws:

HeadlessException - if GraphicsEnvironment.isHeadless returns true

See Also:

GraphicsEnvironment.isHeadless()

createDialog

public JDialog createDialog(java.awt.Component parentComponent,

 String title)

 throws java.awt.HeadlessException

getWindowForComponent

public static java.awt.Window getWindowForComponent(java.awt.Component parentComponent)

 throws java.awt.HeadlessException

Returns the specified component's toplevel Frame or Dialog.

Parameters:

parentComponent - the Component to check for a Frame or Dialog

Returns:

the Frame or Dialog that contains the component, or the default frame if the component is null, or does not have a valid

Frame or Dialog parent

Throws:

HeadlessException - if GraphicsEnvironment.isHeadless returns true

See Also:

GraphicsEnvironment.isHeadless()

A-905
com.cafean.utils

Class Version

java.lang.Object

 |

 +-com.cafean.utils.Version

public class Version

extends Object

implements Comparable

A class representing a Version id as a convinient way to compare, load, and store Version information. Originally intended for use as

an immutable data structure. Converted to a JavaBean to be able to load/save with the archiver classes.

All Implemented Interfaces:

Comparable

Field Summary

public static final DEMO

Value: false

Constructor Summary

public Version()

Creates a new Version instance initialized to 0.0.0

public Version(int major, int minor, int bugfix)

Creates a new Version instance initialized to the given version numbers.

public Version(int major, int minor, int bugfix, String title, String date,

String prefix)

Creates a new Version instance initialized to the given version numbers.

Method Summary

int compareTo(Object o)

Compares this object with the specified object for order.

boolean equals(Object o)

Returns true if and only if the given Object is equivilant to this Version.

int getBugfix()

returns the bugfix revision number.

static Version getCurrent()

Returns the current version.

String getDate()

Returns the release date for this Version.

A-906
int getMajor()

returns the major revision number.

int getMinor()

returns the minor revision number.

String getPrefix()

Returns the prefix or connotation for this Version.

String getTitle()

returns this Version's title.

String getVersionString()

int hashCode()

Generates an integer hash code for this Version.

boolean isDemo()

returns true if this Version is a demo.

static void main(String[] args)

Tests the capabilities of this Version class.

static Version parseVersion(String version)

Creates a Version instance parsed from the given String.

void setBugfix(int bugfix)

Sets this Version's Bugfix Revision Number.

void setDate(String date)

Sets this Version's release date.

void setDemo(boolean demo)

determines whether this Version is a demo;

void setMajor(int major)

Sets this Version's Major Revision Number.

void setMinor(int minor)

Sets this Version's Minor Revision Number.

void setPrefix(String prefix)

Sets this Versions prefix or connotation.

void setTitle(String title)

Sets this Version's application title.

static void showDemoMessage(java.awt.Component parent)

A convinience method for telling the user that something is not usable in a demonstration

version.

String toString()

Creates a String representation of this Version.

Methods inherited from class java.lang.Object

A-907
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface java.lang.Comparable

compareTo

Fields

DEMO

public static final boolean DEMO

Constant value: false

Constructors

Version

public Version()

Creates a new Version instance initialized to 0.0.0

Version

public Version(int major,

 int minor,

 int bugfix)

Creates a new Version instance initialized to the given version numbers.

Version

public Version(int major,

 int minor,

 int bugfix,

 String title,

 String date,

 String prefix)

Creates a new Version instance initialized to the given version numbers.

Methods

getCurrent

public static Version getCurrent()

Returns the current version.

A-908
getMajor

public int getMajor()

returns the major revision number.

getMinor

public int getMinor()

returns the minor revision number.

getBugfix

public int getBugfix()

returns the bugfix revision number.

getTitle

public String getTitle()

returns this Version's title.

getDate

public String getDate()

Returns the release date for this Version. Should probably return a Date or Calendar instead.

getPrefix

public String getPrefix()

Returns the prefix or connotation for this Version.

isDemo

public boolean isDemo()

returns true if this Version is a demo.

setMajor

public void setMajor(int major)

Sets this Version's Major Revision Number.

setMinor

public void setMinor(int minor)

Sets this Version's Minor Revision Number.

A-909
setBugfix

public void setBugfix(int bugfix)

Sets this Version's Bugfix Revision Number.

setTitle

public void setTitle(String title)

Sets this Version's application title.

setDate

public void setDate(String date)

Sets this Version's release date.

setPrefix

public void setPrefix(String prefix)

Sets this Versions prefix or connotation.

setDemo

public void setDemo(boolean demo)

determines whether this Version is a demo;

getVersionString

public String getVersionString()

toString

public String toString()

Creates a String representation of this Version.

parseVersion

public static Version parseVersion(String version)

Creates a Version instance parsed from the given String.

Returns:

a Version parsed from the given String

A-910
main

public static void main(String[] args)

Tests the capabilities of this Version class.

equals

public boolean equals(Object o)

Returns true if and only if the given Object is equivilant to this Version.

hashCode

public int hashCode()

Generates an integer hash code for this Version.

compareTo

public int compareTo(Object o)

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is

less than, equal to, or greater than the specified object.

showDemoMessage

public static void showDemoMessage(java.awt.Component parent)

A convinience method for telling the user that something is not usable in a demonstration version.

A-911
com.cafean.utils

Interface WriteMetrics

public interface WriteMetrics

extends 

Method Summary

boolean writeMetrics(java.io.PrintWriter pw)

Write the data block metrics to an XML file.

Methods

writeMetrics

public boolean writeMetrics(java.io.PrintWriter pw)

Write the data block metrics to an XML file.

Parameters:

pw - the file to write the entry.

Returns:

true - success, false - failure.

A-912
Index

A

abs 867

AbstractBeanComponent 5

AbstractComponent 15

AbstractInsertHandler 793

AbstractModel 43

AbstractPathHandler 796

actionPerformed 394, 695, 784

activate 765, 771, 774, 789

add 118, 272, 835, 839, 846, 850, 854, 866

addAbstractModel 463, 464

addALDocRef 28

addAnnotation 174, 408

addBoxSelectionListener 283

addChild 77

addClassificationListener 474

addCodeInfos 890

addComment 63, 129

addComponent 45, 46, 170

addComponentListener 25

addComponentLookup 58

addComponents 170, 407

addConnection 22, 106

addConnectionSelectionListener 321

addContextHelp 475

addCurrentExportItems 814

addCurrentToolsItems 814

addDockablePanel 456

addDrawnComponent 407, 408

addDrawnConnection 271

addElement 54

addExportItem 469

addImportItem 469

addInputId 212

addMenuItem 412, 469

addMessage 16, 461, 462, 463, 485, 486, 487

addMessageListener 488

addModelNavigationShortcut 476

addMouseHandler 593

addMouseListenerToHeaderInTable 565

addMultipleComments 63, 129

addNotify 236, 270, 368, 485, 514, 592, 656

addOption 151

addOutputId 211

addOverlapPanel 406

addParameter 199

addPibBlock 169

addPlaybackControl 475

addPlaybackPanel 475

addPoint 380, 635

addPopupMenuEntries 50

addPopupMenuItems 607, 623, 637

addPropertyChangeListener 675, 698, 745

addRegisteredDialog 472

addRegisteredFrame 473

addSelectedComponent 279

addSelectedComponents 279

addServer 893

addSound 460, 488

addToFront 273

addToModel 18

addToolbar 406

addToolChangeListener 574

addToView 70

addVisualGroup 285, 286

AlertMsg 483

AlertSound 483

ALL 733

Angle 823

Annotation 604

AnnotationAction 757

appendExportItems 476

appendToolsItems 476

areComponentsScaled 548

ArrayChangedEvent 238

arraysEqual 866

ARROW_FILLED 632

ARROW_HOLLOW 633

ARROW_LINE 633

ARROW_NAMES 633

ARROW_NONE 632

A-913
ARROW_TYPES 633

AsciiViewer 256, 257

B

BaseNumber 827

BeanAction 759

BeanBox 270

BooleanEditor 663

BorderStyleEditor 667

BOTTOM 343

boundsChanged 272

boxSelectionChanged 288

BRITISH 827

buildErrorReport 50

buildInfoRecord 249

buildView 169

C

calcSelectionBounds 280

canAddPoint 380, 635

canAlign 276

canBeResized 353, 782

cancelInsert 769, 793

cancelTableEditing 514

canConnectTo 21, 168

canCopy 276

canCreateComponent 46

canDelete 276

canGroup 284

canPaste 276

canRedo 581, 586

canRemoveComponent 47

canRemovePoint 380, 635

canRepair 157

canUndo 581, 586

canUngroup 284

capacity 836, 840, 851, 855

CAT_CONNECTION 41

CAT_CONSTANT 42

CAT_DATA_SOURCE 41

CAT_FUNCTION 42

CAT_NUMERICS 42

CAT_RANGE 42

CAT_SOURCE_ROOT 41

CAT_VALUES 42

CAT_VARIABLE 42

CAT_VIEW 42

Category 76, 77

CategoryAction 761

ccNumberCheck 53

CENTER 343

CENTER_H 344

CENTER_V 343

checkModel 50, 563

checkRealArrayList 135

checkRealArrayTable 135

CIRCLE 341

classificationChanged 232, 236

ClassificationPanel 236

cleanUpDeleted 61

Clear 349

clear 106, 119, 834, 838, 849, 853

clearCheckErrors 463, 485

clearCheckWarnings 463

clearComponentLookup 57

clearConnections 22

clearDbIds 58, 117, 131

clearInputs 212

clearLinks 349

clearOutputs 211

clearRubberBoxes 432

clearSelection 279, 321, 411

clearViewSelection 174

clearWarningCount 485

ClientPluginLoader 289

clone 17, 79, 95, 103, 106, 120, 128, 149, 168, 197, 209, 225,

311, 348, 829, 834, 838, 849, 853, 864

closeAbstractModel 458

closeAllViews 133

closeMessageWindow 457

COLOR_OPTIONAL 732

compare 563

A-914
compareDouble 829

compareRowsByColumn 562

compareTo 78, 132, 231, 414, 845, 865, 911

compareVersion 59

complete 22, 175, 204, 215, 227

completeConnection 766

componentChanged 86, 257, 368, 383

ComponentChangedEvent 240

componentConnected 86, 257, 368

componentDeleted 86, 257, 368

componentDisconnected 87, 258, 368

componentHidden 624

ComponentList 84

componentMoved 624

componentRemoved 382

componentReshaped 383

componentResized 624

ComponentSelectionDialog 295

ComponentSelectionEditor 672

ComponentSelector 302, 303

componentShown 624

Configurator 882

ConnectingPt 309

Connection 92

ConnectionBean 100

ConnectionData 103

ConnectionList 106

connectionPointRemoved 272, 383

ConnectionSetPanel 321

connectLinks 350

ConnectMouseHandler 764

ConnectSound 484

connectTo 23, 24

contains 107, 119, 355, 356, 382, 634, 834, 838, 849, 853

containsRestartChanges 61

convert 824, 828, 845, 863

copy 7, 17, 168, 275

copyFrom 6, 128, 168, 197, 209, 224

createAsciiFileElement 441

createBeanSelectionMenu 574

createBinaryFileElement 442

createBorderRegion 355

createCategoryToolBars 574

createCategoryView 70

createCenterShape 355

createComponent 46, 81, 757, 759

createConnectionPrototypes 347

createConnectionPt 348

createCursor 576

createDataPages 133

createDialog 905

createDisplayBeans 345, 380, 576

createDrawnComponent 24, 96, 174, 210, 219

createDrawnConnection 385

createModel 459

createModelPackage 72

createNewModel 805

createNumericsMapping 72

createPibBlock 625

createPopupMenu 258, 280, 364

createSelected 575

createSourceData 24

createTargetData 24

createTemplateEntry 370, 385, 422

CreateViewsDialog 326

createZoomMenu 281

CROSSFLOW_DROP_ZONE 308

CROSSHATCH 342

CURSOR_CONNECT 764

CURSOR_CONNECT_COMPLETE 764

CURSOR_CONNECT_OFF 764

CURSOR_MANIP_P 573

CURSOR_PAN 778

CURSOR_PAN_GRIP 778

CURSOR_ZOOM_IN 788

CURSOR_ZOOM_OUT 788

cut 275

D

DATA_COMPLETE 127

DATA_ERROR 127

DATA_INCOMPLETE 126

DATA_WARNING 127

A-915
dateStamp 465, 488

DBtypeCode 20

DCB_MINI_NAV 546

DCB_NAV_SELECT 546

deactivate 765, 775, 781, 789

deactivateRedoButtons 466

debug 136, 454

deepClone 80

delete 275

deleteAllComments 64, 130

deleteComment 64, 129

deleteRubberBox 432

deleteRubberBoxes 432

deleteRubberLine 431

deleteRubberLines 431

DEMO 908

deselectGroup 285

destroy 882

DIAMOND 341

DIFF_VAL 702

Dimless 831

disable 260

DISABLED 732

DISABLED_CONNECTOR 309

disableMainFrame 466

disconnect 21, 96

disconnectAllMyLinks 362

disconnectFrom 21

DisconnectSound 484

displayModelReport 457

divide 847, 867

divideby 867

dockView 173

doLayout 656

doMultiEdit 518

DoubleArray 834

DOWN 343

draw 351, 382, 394, 421

drawLabelStrings 352

DrawnComponent 344

DrawnConnection 378

DrawnUserValue 393

DrawnView 405

DrawnViewComponent 420

drawRubberBox 431

drawRubberBoxes 432

drawRubberLine 431

drawRubberLines 431

DummyCompElement 108

dumpBlockParams 6, 100, 112, 152

E

editCellAt 512

editorChangeValue 668

ElementBean 111

ElementList 116

ElementsAddedEvent 242

ElementsRemovedEvent 244

EllipticalAnnotation 615

enableArrowKeyMovement 167

enableMainFrame 466

enableVisualGrouping 167

ensureVersion21 656

equals 79, 103, 109, 133, 230, 846, 865, 911

execute 214

executeModelValidations 69

executeUserDefinedFunctions 66

exportModelMetrics 69

exportModelMetricsSpec 69

F

findByCC 84

findByDB_ID 117

findByIdent 116, 117

findClientPlugin 469

findComponentByCC 44

findComponentByDB_ID 45

findComponentByIdent 44, 45

findComponentByUniqueID 72

findComponentGroup 51

findComponentsInside 277

findConstant 214

A-916
findDisplayBeanClass 577

findElementByDB_ID 55

findElementByIdent 55

findEmbedded 421

findEquivalentSharedComponent 66

findFunction 215

findGroupByIdent 286

findGroupByOldIdent 286

findModelByIdent 464

findModelDocuments 70

findPlugin 470

findReal 67

findVariable 214

finishInsert 769, 793

fireComponentChanged 25, 175

fireComponentConnected 25

fireComponentDeleted 25, 175, 220

fireComponentDisconnected 25

fireMessageSelected 488

firePropertyChange 675, 711, 754

fitToWindow 282

fixme 136

flip 357

FloatArray 838

formatChanged 533

forTransformPoint 364

forwardMouseEvent 433

forwardMouseEventToBeanBox 433

FunctionSource 185, 186

G

GenericObject 127

get 118, 835, 839, 850, 854

getAbstractModelAt 463

getAbstractModelCount 465

getALDocDisplayName 28

getALDocRefs 27

getALDocShortNames 27, 28

getAnnotationArray 174

getAnnotations 270, 412

getArcHeight 647

getArcWidth 647

getArray 506

getArrows 638

getArrowSize 638

getArrowTypeName 633

getAsciiPrintWriter 806

getAsciiStyledDocument 806

getAsText 663, 669, 672, 681, 689, 703, 741, 745, 752

getAttributeGroup 182, 556

getAttributeGroups 182, 556

getAttributeIndex 181, 203, 227, 558, 609, 734

getAttributesForGroup 182, 556

getBackground 176, 231, 616, 646, 655

getBadgeColors 314

getBadges 314

getBaseErrorColor 550

getBaseHeatedColor 551

getBaseIncompleteColor 550

getBaseNormalColor 550

getBaseNormCsColor 550

getBasePoweredColor 554

getBaseSelectedColor 550

getBaseSpecialColor 550

getBaseWarningColor 550

getBeanBox 366, 413, 592

getBorder 605

getBorderType 668

getBounds 606

getBugfix 909

getButtonIcon 764, 771, 775, 778, 781, 789

getCalcType 442

getCanvasFont 553

getCanvasFontItalic 553

getCanvasFontItalicMetrics 553

getCanvasFontMetrics 553

getCanvasSize 172, 410

getCatCCComparator 23

getCategories 43

getCategory 15, 95, 120, 168, 198, 210, 225, 674, 761

getCategoryComponent 48

getCategoryObject 48

getCCnumber 132, 182

A-917
getCCNumberComparator 23

getCCNumberIncrement 52

getCellEditor 514

getCellEditorValue 517

getChildren 77

getClassification 70

getClassPrereqs 819

getClientPluginAt 470

getClientPluginCount 470

getClipboard 456

getClockwiseFace 360

getCodeInfos 890

getCodePlugins 471

getCollapsedIcon 79

getColor 887, 888

getColorArray 176

getColumnClass 564

getColumnCount 564

getColumnName 564

getComment 64, 130

getComments 130

getComponent 17, 82, 109, 240, 361, 555

getComponentCategory 575

getComponentCCNumber 133

getComponentComparator 70

getComponentCount 47, 48

getComponentDependencies 17

getComponentGroups 51

getComponentID 361

getComponentIterator 47

getComponentNumber 133

getComponents 43, 44, 281, 409

getConfigFileDir 882

getConfigFileName 882

getConnectingLocation 370

getConnectingPt 363, 421

getConnectingPtAt 356

getConnectionColor 97, 550

getConnectionCount 22, 107

getConnectionData 309

getConnectionIndex 103

getConnectionName 26

getConnections 22, 106

getConnectionSize 549

getConnectionSource 435, 766

getConnectionStroke 97

getConnectionTypes 16

getConnectSize 362

getConversionFactor 823, 831, 844, 861, 872

getCopyAction 513

getCounterFace 359

getCreateDate 61

getCrossflowIndex 357

getCurrent 908

getCurrentCursor 574, 575, 765, 768, 775, 779, 782, 788, 793

getCurrentDisplayValue 864

getCurrentIcon 676

getCurrentIndex 198

getCurrentModel 458

getCurrentParametric 200

getCurrentTool 575

getCurrentValue 197, 219, 225

getCursor 765, 775, 782

getCustomEditor 664, 669, 672, 681, 690, 698, 704, 741, 745,

753

getCustomPanel 441

getCustomPopupActions 20, 364

getCustomPopupItems 21, 97, 101, 173, 210, 369, 421

getData 152

getDataState 132

getDataValue 870

getDate 909

getDB_ID 131

getDeckWriter 49

getDefaultDrawLength 350

getDefaultDrawWidth 349

getDefaultEditor 514

getDefaultIndex 200

getDefaultUnits 557

getDefaultValue 201

getDescription 63, 129, 784

getDimensionless 68

getDisplayName 156, 861

getDisplayValue 824

A-918
getDividerLocation 886

getDocDescription 95

getDockablePanels 456

getDocLinks 71

getDocumentLinks 66

getDoubleClickBehavior 548

getDoubleValue 533, 863

getDrawAngle 350

getDrawingFace 357

getDrawingObject 350

getDrawnComponent 271

getDrawnComponentAt 408

getDrawnComponentCount 408

getDrawnComponents 281, 409

getDrawnView 171, 596, 604

getElementAt 55

getElementCount 55

getElementIterator 54

getEmbedConnArray 175

getEmbeddedCons 177

getEndValue 201

getENG_Units 823, 827, 832, 844, 862, 873

getErrorColor 549

getExpandedIcon 79

getExportNote 67

getExportUnits 68

getFace 499

getFaceByAngle 358

getFeaturePlugins 471, 472

getFileChooser 472

getFillColor 351

getFont 889, 890

getForeground 230, 616, 646, 655

getFormat 532, 824, 829, 845, 863, 873

getFunction 213

getGeometry 883, 884, 885

getGlassPane 366, 593

getGridLineColor 178

getGroupedConnections 26

getGroupID 345, 604

getHandle 313

getHandlerID 775

getHandleSize 315, 362, 548

getHead1 639

getHead2 639

getHeatedColor 550

getHeight 605

getHorizGridSpacing 179

getHorizSnapSpacing 180

getHtmlUnits 72, 862

getIcon 784

getIdent 130

getImage 173

getImageData 174, 625

getImageElement 177

getImageURL 79

getIncompleteColor 549

getIncrement 202

getIndexes 243, 245

getIndexForRow 565

getIndicatorColor 345

getInitialCCNumber 51

getInputAt 213

getInputCount 212

getInputIdAt 212

getInputValue 213

getInstance 485

getIterator 107

getJavaInitializationString 664, 668, 673, 681, 689, 698, 704,

740, 745, 753

getKeys 152

getLabel 395, 656, 807

getLabelPlural 807

getLastCCNumber 53

getLastJobPath 441

getLastJobUrl 441

getLastPath 553, 554

getLastSubmittedRun 441

getLayoutIterations 556

getLeftComponent 94

getLeftComponentID 94

getLeftConnectData 93

getLength 350

getLenScaleFactor 65, 346

A-919
getLineThickness 617, 637, 647

getLoadFormat 864

getLocalServer 893

getLocation 171, 499

getLongValue 533

getLoopCheck 50

getMajor 908

getMajorCreationVersion 135

getMajorVersion 135

getMarkedLocation 385

getMaxCCNumber 51

getMaxHeight 360

getMaximumSize 273, 430, 595

getMaxWidth 360

getMenubar 405

getMessageFont 553

getMessages 488

getMinimumSize 273, 422, 595, 623

getMinor 909

getMinorCreationVersion 135

getMinorVersion 135

getMinWidth 360

getMirrorImageShape 354

getMode 474

getModel 18, 69, 109, 145, 146, 270, 407, 458, 518, 536, 555,

562, 674, 705, 711, 746, 754

getModelDB_ID 56

getModelMajorVersion 59

getModelMinorVersion 60

getModelOptions 65

getModelPanel 73

getMouseHandler 593

getName 20, 63, 129, 155, 784, 813, 869

getNavigatorComponent 73

getNeedsTarget 316

getNewArray 239

getNewCompIdent 17, 136

getNewComponentIdent 48

getNewElementIdent 55

getNewInsertHandler 617, 639, 648, 798

getNextCCNumber 52

getNormalColor 549

getNormalObj 347

getNormCsColor 549

getNrcDBServer 891

getNumberConnections 363

getNumberOfErrorsFound 460, 488

getNumberOfWarningsFound 460

getNumberValue 533

getNumComments 64, 129

getNumSelected 279

getOldArray 239

getOppositeFace 359

getOption 151

getOrb 468

getOrder 26

getOrderComparator 23

getOrientation 358

getOrientationMenu 363, 398

getOrientationName 344

getOtherSide 93

getOtherSideData 93

getOutputAt 211

getOutputCount 210

getOutputIdAt 210

getOutputStream 485

getOwner 17, 62, 82, 109, 186, 555

getOwnershipManager 70

getPad 313

getPadXY 499

getPanel 396

getPanelSize 274, 594

getParameterAt 198

getParameters 199

getParametersCount 198

getParent 77, 369

getParentDB_ID 58

getPasteAction 513

getPath 634

getPdfViewer 474

getPibBlocks 169

getPixelsPerMeter 177

getPlugin 43

getPluginAt 470

A-920
getPluginClass 818

getPluginCount 471

getPluginDocFileData 71

getPluginHelpSet 816

getPluginIcon 807

getPluginId 49, 813, 818

getPluginInfo 816

getPluginPreferences 816

getPluginPrereqs 815, 818

getPluginType 805, 809, 813

getPoweredColor 554

getPreferredSize 273, 365, 394, 595

getPrefix 909

getPrefs 468

getPresentationName 579, 582, 584, 586

getProgramOptions 65

getProjectDB_ID 57

getProperty 891

getPropertyChangeListener 675

getPropertyChangeListenerCount 675

getPythonHeader 215

getPythonInit 215

getRealByIndex 67

getRealSize 22

getReferencedValue 867

getReferenceModel 464

getRegisteredDialogs 472

getRegisteredFrames 473

getRightComponent 94

getRightComponentID 95

getRightConnectData 93

getRootComponents 65

getRootNodeComparator 69

getRootParent 78

getRotatedLocation 315, 316

getRowCount 564

getRunValues 204

getSamPackage 805

getSaveFile 59

getSaveFileName 58

getScale 274, 596

getScaleComponents 548

getScrollPane 596

getSelectAllAction 513

getSelected 279

getSelectedColor 549

getSelectedComponents 409

getSelectedConnector 356

getSelectedDropZone 356

getSelectedIndex 495

getSelection 278, 279, 297, 303

getSelectionBounds 280

getServer 442

getServers 893

getSessionMode 555

getSharedComponents 16

getShortDescription 156

getShowCreateViewDialog 557

getShowPoints 172

getShowWelcomeDialog 557

getSI_Units 823, 827, 832, 844, 861, 873

getSignificantFigs 868

getSize 171

getSnapHomeDirectory 472

getSortAction 513

getSource 382

getSourceCode 186

getSpecialColor 549

getSplashStatus 457

getSplashTitle 457

getStartValue 201

getStrippedValue 867

getSubComponentAt 370, 421

getTabLayout 556

getTableCellEditor 496, 674

getTableCellEditorComponent 518

getTableCellRenderer 674

getTableCellRendererComponent 523

getTags 664, 669, 673, 681, 690, 699, 704, 741, 745, 753

getTarget 382

getTemplateCC 405

getText 655

getTextMargin 656

getThisSideData 94

A-921
getTitle 413, 909

getToolbox 406

getToolTipText 78, 351, 381, 430

getTooltipText 764, 771, 776, 779, 782, 789

getTransferData 868

getTransferDataFlavors 867

getTransparency 179

getType 312

getUndoManager 73, 458

getUndoSupport 459

getUniqueID 27, 182, 220

getUnitIndex 68

getUnitName 864

getUnits 68, 202, 219, 226, 395, 829, 862

getUnitsDisplay 67

getUnitType 827

getUsedBounds 383, 424, 637

getUseMultiUndoEvents 513

getUserName 468

getValidationOptions 68

getValidationTests 68

getValidLabel 471

getValue 534, 664, 668, 673, 682, 689, 699, 704, 716, 722,

740, 745, 753, 844, 863

getValueAt 563

getValueLabel 396

getValueText 396

getVerbosity 157

getVersion 457, 815, 818

getVersionString 910

getVertGridSpacing 179

getVertSnapSpacing 180

getViewComponent 282, 406, 592

getViewImage 405

getViewportCenter 593

getViewPosition 173, 411

getViewSelectionMode 559

getViewSize 411

getVisualGroups 285

getWarningColor 549

getWarningCount 488

getWebSupport 892

getWidth 605

getWidthScaleFactor 65, 182, 282, 346

getWindowForComponent 905

getWindowingMode 555

getWriteable 257

getX_Pos 361

getXDistBetweenCPs 352

getXDistBetweenXflowCPs 352

getXpdfPath 557

getY_Pos 361

getZoomablePanel 367, 413

getZoomScale 172, 410

getZoomSize 595

GlassPanel 430

greaterthan 846, 865, 866

group 284

H

halfPI 823

hasALDocRefs 28

hasBlocks 170

hashCode 845, 911

hasModelMetrics 69

hasNext 190, 200

hasSubComponents 370, 421

hideComponentNumber 303

hideComponentType 303

I

ICON_ELL_ANNOT 573

ICON_IMAGE_ANNOT 573

ICON_LINE_ANNOT 573

ICON_NEW 573

ICON_REC_ANNOT 573

ICON_TXT_ANNOT 573

ID 420

ImageAnnotation 623

importTemplate 406

INACTIVE 702

includeInLoopcheck 26

A-922
incrementMajorVersion 60

incrementMinorVersion 60

indexOf 118, 835, 839, 850, 854

InfoMsg 483

InfoSound 484

init 321, 683, 696, 746, 752

InitDrawing 345, 379, 393, 421

initializeDataSources 476

INLET_DROP_ZONE 308

INLET_MOVEABLE_CONNECTOR 308

insertFailed 535

InsertMouseHandler 768

instance 454

Int 843, 844

IntegerArray 849

InteractiveMouseHandler 771

InternalErrMsg 483

InternalErrSound 484

IntNonMultiEdit 681

IntSpinnerEditor 688

inverseTransformPoint 596

INVISIBLE_CONNECTOR 308

isAnimatable 806

isArrowKeyMovementEnabled 167

isAssociated 810

isAutoScale 365

isBeanBased 806

isCanceled 304

isCancelled 297, 495, 505, 672

isCellEditable 565

isCompActionSelected 575

isConnected 313

isContained 85

isCurrentlyCopying 513

isCurrentlyPasting 514

isCustomLabel 398

isDashed 639

isDatabaseConfigured 559

isDataFlavorSupported 868

isDeleted 131

isDemo 909

isDirty 67

isDrawBadges 365

isDrawConnSource 379

isDrawConnTarget 379

isDrawLine 379

isEditable 394

isEditingRestart 61

isEnabled 156

isEqualTo 96

isEquivalent 147

isFilled 615, 645, 657

isGridAbove 181

isGroupIDValid 346, 605

isIncremental 201

isIndependentComponent 93

isInProgress 765

isJava3DAvailable 469

isJeditAvailable 547

isKnown 828, 869

isLocked 180

isMostlyVerticalDown 824

isMostlyVerticalUp 824

isObjectInsideBounds 355, 381, 636

isOkayForExport 22

isOpaque 646, 657

isPaintable 664, 669, 673, 681, 690, 699, 704, 740, 745, 753

isParametric 200

isPlenumShaped 347

isPluginEnabled 475

isPluginInUse 476

isPosnSet 364

isPropertyActive 181, 203, 226, 558, 608, 733

isPropertyEnabled 181, 202, 226, 557, 608, 733

isPropertyRequired 181, 202, 226, 558, 608, 733

isPropertyResizable 181, 203, 227, 558, 609, 734

isPropertyRestartEditable 181, 202, 226, 558, 608, 733

isRepresenting 421

isRestartableModel 61

isRestartResizable 181, 203, 227, 558, 609, 734

isRounded 647

isScalable 353

isSegmentSet 344

isSelected 279, 369

A-923
isSelectedDockablePanel 457

isShowGrid 178

isShowLabel 394

isShowNumbers 705

isShowUnits 395

isSingleFrame 555

isSnapToGrid 178

isSorted 119

isStraightLine 384

isSubset 78

isSuperset 78

isUncertain 535

isUnknown 533, 828, 869

isUnlockedAA 558

isValidCCNumber 53

isValidLabel 471

isValveShaped 347

isVerticalDown 824

isVerticalUp 824

isViewLock 43

isViewVisible 173

isVisible 312

isVisual 79, 96

isVisualGroupingEnabled 167

itemStateChanged 667, 703, 711, 730

iterate 199

iterator 85, 120

J

joinPipe 62

L

label 20, 96, 168, 198, 214, 225

layoutComponents 53

layoutView 169, 408

LEFT 342

leftDiffComponent 14

leftDiffName 15

leftShortDiffName 15

lessthan 846, 865

LimitedLongStringEditor 695

LineAnnotation 633

load 167, 547, 809

loadComponent 176

loadComponents 277

loadDisplayBean 576

loadDisplayBeanClasses 577

loadDrawnComponent 66, 370, 385, 398, 421

loadMainMenuItems 814

loadOptions 156

loadPlugin 819

loadReferenceModel 465

loadRestartData 49

loadSettings 815

loadUserConstant 249

loadUserFunction 249

loadUserVariable 248

loadVedaExport 576

loadViewMenuItems 814

loadVisualComponents 248

loadVisualGroups 276

LocalSubmitDialog 440

locateComponentAt 434

lockToString 861

LongArray 853

LongStringEditor 698

lookupComponent 57

lostOwnership 467, 536

M

main 468, 655, 835, 839, 850, 854, 910

MainFrame 455

makeArray 832, 873

makeBumpyTexture 553

MAX_PAGE_HEIGHT 166

MAX_PAGE_WIDTH 166

max_positions 343

MECodePlugin 804

MEDReader 248

MEFeaturePlugin 809

menuCanceled 412

A-924
menuDeselected 412

menuSelected 412

MEPlugin 813

MEPluginData 817

MessageWindow 484

minimizeView 283

MODE_CLEAR_CONSTANTS 455

MODE_EXPORT_ASCII 455

MODE_EXPORT_ASCII_EXPLICIT 455

MODE_IMPORT 455

MODE_NORMAL 455

MODE_SAVE_MED 455

modelAdded 809

modelRemoved 809

mouseClicked 258, 366, 381, 422, 433, 607, 635, 765, 769,

775, 779, 793, 796, 800

mouseDragged 366, 381, 433, 636, 765, 768, 771, 779, 782,

789, 796, 800

mouseEntered 258, 365, 381, 432, 607, 636, 776, 793

mouseExited 258, 365, 381, 433, 607, 636, 776, 794

MouseHandler 774

mouseMoved 366, 381, 422, 432, 636, 765, 768, 776, 794, 797

mousePressed 258, 366, 381, 432, 607, 635, 765, 768, 771,

779, 782, 789, 796, 800

mouseReleased 258, 366, 380, 433, 607, 636, 766, 769, 772,

779, 782, 789, 797, 800

move 315

moveRel 353

moveTo 353, 606, 633

multiply 847, 866

N

NAME_NUMBER 189

NAME_VALUE 189

NamedIntEditor 703

NamedValueSelector 494, 495

NamelistBooleanEditor 710

NamelistDoubleEditor 716

NamelistIntEditor 722

NamelistNamedIntEditor 724

NamelistRealEditor 729

next 190

NODE_FLAVOR 405

NOFORN 230

NONE 230, 341, 732

normalize 535

normalizeArray 869

NoSound 483

Num_Databases 546

O

objectAdded 53

offsetWindowLocation 467

open 805

openFileSelector 466

openMessageArea 463

openModelMED 459

OPTIONAL 732

OptionPane 900, 901

organizeSelection 282

organizeView 280, 281

OUTLET_DROP_ZONE 308

OUTLET_MOVEABLE_CONNECTOR 308

P

Pad 498

paint 275, 351

paintChildren 592

paintComponent 351, 434, 616, 624, 633, 645

paintImmediately 275

paintValue 664, 669, 673, 682, 690, 699, 704, 740, 746, 753

panelRemoved 413

panelSelected 413

PanMouseHandler 778

ParametricIteration 189

parseVersion 910

paste 276

performExport 327

performLoopCheck 50

PIXELS_P_METER 344

PIXELS_PER_METER 166

A-925
pluginException 290

pluginLoaded 289

popupBeanDataDialog 6, 7

popupDataDialog 7, 20, 101, 133, 177, 209, 220

popupEditor 397, 606, 616, 624, 634, 646, 655

postEdit 73

print 275, 351, 604

printView 410

processCommand 459, 814

PropertyEditorPanelSupport 739

R

rangeCheck 136, 137, 138, 139

readAnnotationArray 174

readBlock 112, 152

readBlockParams 6, 100, 112, 153

readByteArray 397

readDrawingBlock 248

readEmbedConnArray 175

readTemplateEntry 370, 385, 423

Real 860, 861

RealArrayDialog 504, 505

RealArrayEditor 744, 745

RealBeanEditor 752

RealEditor 516, 517

RealRenderer 523

RealTextField 531, 532

rebuildConnections 19

reconnectGroupIDs 284

reconnectIdentReferences 29, 57, 96, 107, 117, 131, 144, 209

reconnectImage 19

RectangularAnnotation 645

RectangularInsertHandler 800

reDirectStdErrOut 893

redo 579, 581, 584, 586

redrawSelection 283

refresh 257, 274, 321, 537, 594, 608

refreshCompBounds 594

refreshSteamTable 466

remove 118, 271, 272, 835, 839, 850, 854

removeAbstractModel 464

removeALDocRef 28

removeAllCodeInfos 890

removeAllServers 893

removeBoxSelectionListener 283

removeClassificationListener 474

removeClosestPoint 380, 635

removeComponent 47

removeComponentListener 25

removeConnection 107

removeConnectionSelectionListener 321

removeDeleted 117

removeDockablePanel 456

removeElement 54

removeExcessRecents 466

removeFromModel 19, 167

removeInputAt 213

removeModelRefs 489

removeMouseHandler 594

removeNotify 236, 270, 368, 430, 514

removeOutputAt 211

removeParameter 199

removePlaybackControl 475

removePlaybackPanel 475

removePoint 635

removeProperty 887

removePropertyChangeListener 675, 699, 746

removeRegisteredDialog 473

removeRegisteredFrame 473

removeSelectedComponent 278

removeServer 892

removeToolChangeListener 574

removeVerify 19, 167

removeVisualGroup 286

renodalizePipeCells 62

renumberComponents 65

renumberSelectedComponents 280

repaint 274, 383, 434, 608, 636

repair 157

replaceNumericNames 220

reportModelCheck 54

repositionLinks 357

requestSaveFileName 460

A-926
REQUIRED 732

requiresTarget 435, 766

reset 623

resetAllUnits 459

resetConnections 283

resetCursor 465

resetIteration 190, 199

resetMenus 475

resetModule 547

resetPosition 353

resetSize 607, 617, 624, 637, 646, 656

resetWindowingMode 456

resetZoomMenu 410

restoreALRefState 29

restoreState 26, 113, 127, 153, 204, 220, 227, 278, 367, 384,

397, 422, 606, 617, 625, 638, 654, 869

RESTRICTED 230

revalidate 287, 594, 637

revTransformPoint 364

RIGHT 343

rightDiffComponent 14

rightDiffName 15

rightShortDiffName 15

rotate 315

rotateTo 354

run 260

runValidation 156

S

save 547, 809, 882

saveModel 49

saveOptions 156

saveSelected 326

scaleIt 353

SEGMENT_BOTH 342

SEGMENT_INLET 342

SEGMENT_NONE 342

SEGMENT_OUTLET 342

SEGMENT_SPECIAL 342

selectCategory 283

selectGroup 285

SelectMouseHandler 781

SELECTOR_OPEN 454

SELECTOR_SAVE 455

SESSION_ALWAYS 545

SESSION_NAMES 546

SESSION_NEVER 545

SESSION_PROMPT 545

SESSION_VALUES 546

set 835, 839, 850, 854

setALDocRefs 27

setAllowEmpty 295

setAllowNumerics 536

setArcHeight 647

setArcWidth 647

setArrows 638

setArrowSize 638

setAsText 664, 668, 673, 682, 689, 699, 704, 741, 746, 752

setAutoScale 365

setAvailable 672

setAvailableComponents 296

setBackground 176, 286, 397, 592, 616, 646, 655

setBackupComponent 344

setBadgeColors 314

setBadges 314

setBaseErrorColor 551

setBaseFile 190

setBaseHeatedColor 551

setBaseIncompleteColor 551

setBaseNormalColor 551

setBaseNormCsColor 551

setBasePoweredColor 554

setBaseSelectedColor 551

setBaseSpecialColor 551

setBaseWarningColor 551

setBorder 605

setBounds 347, 422, 606

setBugfix 910

setCanvasFont 553

setCanvasSize 172, 410

setCategory 120, 295, 674

setCCNumberIncrement 52

setChildLocation 467

A-927
setColor 888, 889

setColorArray 176

setComments 130

setComponent 361

setComponentComparator 297

setComponentNumber 21, 133

setComponentNumberConstrained 7

setConnected 313

setConnection 584

setConnectionColor 552

setConnectionIndex 103

setConnectionSize 549

setConnectionStart 766

setConnectPtType 312

setConstants 190

setContext 703, 711, 717, 730

setCreateDate 61

setCreationVersion 134

setCreator 296, 673

setCurrentAction 575

setCurrentModel 458

setCurrentParametric 200

setCurrentTool 574

setCurrentValue 225

setCurrentValueDouble 225

setCustomLabel 398

setCustomTable 505

setDashed 639

setData 152

setDataState 132

setDataValue 870

setDate 910

setDB_ID 132

setDefaultIndex 200

setDefaultUnits 557

setDefaultValue 201

setDeleted 20, 131

setDemo 910

setDescription 63, 129

setDimension 746

setDirty 67

setDisabledCellsGray 523

setDisabledTextVisible 523

setDisconnected 313

setDividerLocation 885, 886

setDoubleClickBehavior 548

setDrawAngle 350

setDrawBadges 365

setDrawHeight 362

setDrawWidth 362

setEditable 394, 672

setEmbeddedCons 177

setEnabled 157

setEndValue 201

setEqualTo 349, 616, 634, 646

setErrorColor 552

setExportNote 67

setFace 499

setFileChooserLocation 467

setFilled 615, 645, 657

setFireGlobalEvents 703, 710, 729

setFirstFieldDisplayed 496

setFont 655, 673, 739, 889

setForeground 397, 616, 646, 655, 739, 752

setFormat 532

setFunction 214

setGeneratePoints 384

setGeometry 883

setGridAbove 181

setGridLineColor 178

setGroupID 345, 605

setGroupIDValid 346, 605

setGroupMessages 487

setHandle 314

setHandlerID 775

setHandleSize 314, 548

setHead1 639

setHead2 639

setHeatedColor 552

setHeight 605

setHorizGridSpacing 179

setHorizSnapSpacing 180

setIdent 56, 131

setImageData 174, 625

A-928
setImageElement 177

setIncompleteColor 552

setIncrement 202, 689

setIncremental 201

setInputIdAt 212

setKeys 152

setKnown 828

setLabel 395, 656

setLabelString 363

setLastPath 554

setLayoutIterations 556

setLeftComponent 94

setLeftComponentID 94

setLenScaleFactor 66, 346

setLineThickness 617, 637, 648

setLocation 171, 379

setLocked 180, 406, 574

setLockedConstrained 180

setLookAndFeel 893

setMajor 909

setMajorCreationVersion 134

setMajorVersion 134

setMaximum 689

setMinimum 688

setMinor 909

setMinorCreationVersion 134

setMinorVersion 135

setMode 474

setModel 18, 145, 190, 296, 518, 536, 562, 674, 705, 711, 747,

754

setModelDB_ID 56

setModelMajorVersion 59

setModelMinorVersion 60

setModule 883

setName 63, 128, 220, 813

setNameConvention 190

setNeedsTarget 316

setNormalColor 552

setNormCsColor 552

setNrcDBServer 892

setOpaque 615, 657

setOrder 26

setOrientation 358

setOrientationByAngle 358

setOrientationConstrained 358

setOutputIdAt 211

setOutputStream 485

setOutputValue 211, 212

setOwner 62, 186

setPad 313

setPadXY 498, 499

setPaintEnabled 275

setPanel 396

setPanelSize 594

setParameter 203

setParameterAt 199

setParameters 199

setParametric 200

setParent 368

setParentDB_ID 58

setPath 379, 634

setPibBlocks 169

setPixelsPerMeter 177, 347

setPlaybackTime 475

setPluginEnabled 476

setPoweredColor 554

setPrefix 152, 910

setProgramOptions 65

setProjectDB_ID 56

setProperty 887

setRightComponent 95

setRightComponentID 95

setRounded 647

setRunOptions 441

setSaveFile 59

setScale 274, 595

setScaleComponents 548

setSelected 303, 369, 383

setSelectedColor 552

setSelectedComponent 278

setSelectedDockablePanel 457

setSelectedIndex 495

setSelectedValue 495

setSelection 296

A-929
setServer 442

setSessionMode 555

setShowCategory 296

setShowComponentNumber 296

setShowCreateViewDialog 557

setShowGrid 178

setShowHS_connections 548

setShowIcons 295

setShowLabel 394

setShowNumbers 705

setShowPoints 172

setShowSize 689

setShowUnits 395

setShowWelcomeDialog 557

setSignificantFigs 868

setSize 171

setSizeTo 352

setSnapToGrid 178

setSortable 505

setSourceCode 186

setSpecialColor 552

setSplashStatus 457

setStartValue 201

setStoredBackground 176

setStraightLine 384

setTabLayout 557

setTargetComponent 257

setText 533, 655

setTextLabelString 739

setTextMargin 657

setTitle 296, 910

setTransparency 179

setUnits 68, 202, 219, 226, 395

setUnitsConstrained 68

setUnitType 827

setUnknown 828, 864

setUnlockedAA 558

setupContextHelp 485

setUpEditor 517

setUpRealEditor 517

setUserName 468

setValue 534, 535, 664, 668, 673, 682, 689, 699, 704, 711,

729, 740, 746, 753, 828, 844, 862

setValueAt 564

setValueLabel 396, 495

setValueText 396

setValueUncertain 535

setValueUnknown 534

setVerbosity 157

setVertGridSpacing 179

setVertSnapSpacing 180

setViewCenter 597

setViewLock 43

setViewPosition 173, 411

setViewSelectionMode 559

setVisible 169, 257, 296, 326, 409, 440, 466

setWaitCursor 465

setWarningColor 552

setWebSupport 892

setWidth 606

setWidthScaleFactor 66, 182, 346

setWindowingMode 555

setWindowLocation 467

setX_Pos 361

setXpdfPath 558

setY_Pos 362

setZoomScale 172, 411

showAllConnections 282

showCancelButton 303

showComment 64, 130

showConfirmDialog 902, 903

showConnections 366

showCreateDialog 459

showDemoMessage 911

ShowHS_connections 548

showInputDialog 903, 904

showMessageDialog 902

showOpenDialog 459

showOptionDialog 904

SI 826

size 84, 118, 835, 839, 850, 854

SnapPreferences 547

snapshotView 409

sort 119, 563, 836, 840, 851, 855

A-930
sortByColumn 565

sortParallelRealArrays 869

SpecialConnectionData 148, 149

splitPipe 62

sqrt 847, 867

SQUARE 342

STATIC_CONNECTOR 308

stopTableEditing 514

store 170, 369, 385, 397, 420, 606

storeALRefState 29

storeComponent 170

storeDisplayBean 576

storeDrawnComponent 66

storeSettings 815

storeState 112, 128, 153, 203, 227, 278, 367, 384, 397, 422,

606, 616, 624, 638, 654, 869

storeUserConstant 249

storeUserFunction 249

storeUserVariable 248

submitModel 465, 806

subtract 847, 866

supportsCustomEditor 664, 669, 674, 682, 690, 699, 704, 742,

746, 753

T

tableChanged 563

TableSorter 562

TempClipboardEnabledTable 512

TextAnnotation 654

THEORYMAN 42

Time 872

toArray 84, 119, 836, 840, 851, 855

toFront 277, 488

TOLERANCE 796

toLoadString 864

TOOL_CONNECT 572

TOOL_INSERT 572

TOOL_INTERACTIVE 572

TOOL_NONE 572

TOOL_PAN 572

TOOL_SELECT 572

TOOL_ZOOM 572

Toolbox 573

ToolboxAction 784

toolChanged 593, 786

TOP 343

toShortHtml 676

toShortString 23

toString 23, 67, 78, 85, 95, 104, 120, 149, 157, 168, 198, 214,

225, 230, 280, 310, 348, 383, 535, 608, 764, 776, 779, 781,

789, 816, 828, 845, 863, 864, 910

trace 136

transformPoint 596

translate 383, 424, 637

translateConnectionToScreen 367

translatePointToScreen 367

TRIANGLE 341

trimToSize 836, 840, 851, 855

tryLockOrganize 280

TYPE_CODE_PLUGIN 812

TYPE_FEATURE_PLUGIN 812

typeIsConnector 310

typeIsCrossflow 312

typeIsDropZone 310

typeIsInlet 311

typeIsOutlet 311

typeIsStatic 311

U

UNCLASSIFIED 230

undo 579, 581, 584, 586

UndoableConnect 579

UndoableDelete 581

UndoableDisconnect 584

UndoableInsert 586

undockView 173

ungroup 284

UNIT_NAMES 826

unitsChanged 258, 537

UNKNOWN 702

Unknown 843, 860

unlockOrganize 280

A-931
unlockToString 861

UP 343

update 260

updateAvailable 894

updateClassification 474

updateComponentList 282

updateDocLinks 71

updateLabel 695, 739

updateLookAndFeel 893

updateNumerics 72

updatePlaybackButtons 474

updatePluginDocFileData 71

Updater 260

updateSelection 283

updateToolbars 411

updateValue 740

updateVersion 23, 134

UserDefinedConstant 197

UserDefinedFunction 209

UserDefinedValue 218

UserDefinedVariable 224

userDelete 18

userDisconnect 96

UserErrorMsg 483

UserErrorSound 484

useRestartFile 441

useRestartJob 441

USERSMAN 42

V

validate 132, 215, 379, 637

validateAllComponents 48

ValidationOptions 151

ValidationTest 155

value 843

valueChanged 297

ValueOutOfRangeException 874, 875

VERBOSITY_HIGH 155

VERBOSITY_LOW 155

VERBOSITY_QUIET 155

verifyBeansAvailable 576

verifyVersion 249

Version 908

VIEW_SEL_IND 547

VIEW_SEL_NAV 547

VIEW_SEL_NAV1 547

ViewComponent 166, 167

W

WarningMsg 483

WarningSound 484

WINDOW_MULTIPLE 545

WINDOW_NAMES 546

WINDOW_NAVIGATOR_ABOVE_PROPERTIES 545

WINDOW_NAVIGATOR_BESIDE_PROPERTIES 545

WINDOW_SINGLE 546

WINDOW_VALUES 546

write 250

writeArrayLoadValue 141, 142

writeBlockParams 6, 100, 112, 153

writeConstantTable 191

writeDescription 191

writeExportNote 190

writeMetrics 912

writeMuxLoadArray 140

writeName 27, 191

writeSP 140

writeTableHeader 191

writeTableLine 191

Z

ZoomablePanel 592

ZoomMouseHandler 788

zoomToFit 597

A-932
BIBLIOGRAPHIC DATA SHEET

(See instructions on the reverse)

NRC FORM 335

(9-2004)

NRCMD 3.7

U.S. NUCLEAR REGULATORY COMMISSION 1. REPORT NUMBER

 (Assigned by NRC, Add Vol., Supp., Rev.,

 and Addendum Numbers, if any.)

NUREG/CR-6974, Vol. 3

3. DATE REPORT PUBLISHED

MONTH

June

YEAR

2009

4. FIN OR GRANT NUMBER

Y6851

2. TITLE AND SUBTITLE

Symbolic Nuclear Analysis Package (SNAP)

Common Application Framework for Engineering Analysis (CAFEAN) Preprocessor Plug-in

Application Programming Interface

Appendix A, Part B

5. AUTHOR(S)

Ken Jones, John Rothe, William Dunsford

6. TYPE OF REPORT

Technical

7. PERIOD COVERED (Inclusive Dates)

8. PERFORMING ORGANIZATION - NAME AND ADDRESS (If NRC, provide Division, Office or Region, U.S. Nuclear Regulatory Commission, and mailing address; if contractor,

Applied Programming Technology, Inc

9. SPONSORING ORGANIZATION - NAME AND ADDRESS (If NRC, type "Same as above"; if contractor, provide NRC Division, Office or Region, U.S. Nuclear Regulatory Commission, 

Division of System Analysis

provide name and mailing address.)

and mailing address.)

10. SUPPLEMENTARY NOTES

C. Gingrich, NRC Project Manager

11. ABSTRACT (200 words or less)

Many of the analytical codes developed by the Office of Nuclear Regulatory Research (RES) rely on a text based input file to

specify model parameters and computational options. The formats of the text based input files are often quite complex and

usually require careful study before a user can create an input model that functions correctly. The Symbolic Nuclear Analysis

Package (SNAP) is primarily a graphical user interface that was developed to simplify the analyst's task of creating input files for

the analytic codes as well as helping to visualize code results. SNAP is a Java based computer application that runs on the

most popular computer platforms including Windows XP and Vista, LINUX based systems, and Mac OS X. The code

architecture used in SNAP is "plug-in" based and very flexible. Third party developers can implement their own user interfaces

under SNAP without breaking the interfaces developed by other developers. The application programming interface (API) that is

described in this document provides a short tutorial and some guidelines for developing a custom plug-in that works in the SNAP

framework. This document also includes the actual API method and data-structure definitions needed to create such a custom

interface.

12. KEY WORDS/DESCRIPTORS (List words or phrases that will assist researchers in locating the report.)

Graphical User Interface, Analysis, Analytic Code, Computation Code, Computation, Symbolic Nuclear

Analysis Package, Graphical, User Interface, Java, plug-in, GUI, SNAP 14. SECURITY CLASSIFICATION

13. AVAILABILITY STATEMENT

unlimited

(This Page)

unclassified

(This Report)

unclassified

15. NUMBER OF PAGES

562

16. PRICE

NRC FORM 335 (9-2004) PRINTED ON RECYCLED PAPER

240 Market St., Suite 208

Bloomsburg, PA 17815-1951

Office of Nuclear Regulatory Research

U.S. Nuclear Regulatory Commission

Washington DC 20555-0001