|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--org.concord.biologica.ui.UIView
The basic user interface view of BioLogica.
An object of this class will generate the following property change events:
UIProp.BACKGROUND
,
UIProp.FONT
,
UIProp.FOREGROUND
,
PropertyChangeListener
, Serialized FormInner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Field Summary | |
protected java.beans.PropertyChangeSupport |
changes
Utility object which manages property change events and listeners. |
protected int |
fontAscent
Font ascent |
protected int |
fontDescent
Font descent |
protected int |
fontHeight
Font height |
protected java.awt.FontMetrics |
fontMetrics
Font metrics |
protected int |
preferredHeight
Preferred height of this view. |
protected int |
preferredWidth
Preferred width of this view. |
protected javax.swing.JScrollPane |
scrollPane
Optional scroll pane parent of this view. |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
protected |
UIView()
Creates a user interface view. |
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener aListener)
Add a property change listener for properties. |
static javax.swing.ImageIcon |
getLocalImage(java.lang.String path)
|
java.awt.Dimension |
getPreferredSize()
Return the preferred size of this canvas |
protected void |
paintBackground(java.awt.Graphics g,
java.awt.Rectangle bounds)
Paint the background of this view using the given Graphics and bounds rectangle. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener aListener)
Remove a property change listener for properties. |
void |
setBackground(java.awt.Color aBackground)
Set the background color for this view. |
void |
setFont(java.awt.Font aFont)
Set the font for this view. |
void |
setForeground(java.awt.Color aForeground)
Set the foreground color for this view. |
void |
setScrollPane(javax.swing.JScrollPane aScrollPane)
Tell this view its scroll pane. |
void |
toolChanged(int aTool)
Method called by ToolView when the current tool changes. |
protected void |
updateFont(java.awt.Graphics g)
Update the font settings |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.awt.FontMetrics fontMetrics
protected int fontAscent
protected int fontDescent
protected int fontHeight
protected javax.swing.JScrollPane scrollPane
protected int preferredWidth
protected int preferredHeight
protected transient java.beans.PropertyChangeSupport changes
Constructor Detail |
protected UIView()
Method Detail |
public static javax.swing.ImageIcon getLocalImage(java.lang.String path)
public void setScrollPane(javax.swing.JScrollPane aScrollPane)
aScrollPane
- JScrollPane - the scroll pane containing this view, may be nullpublic void setFont(java.awt.Font aFont)
setFont
in class javax.swing.JComponent
aFont
- Font - a new font, if null, then will revert to default fontpublic void toolChanged(int aTool)
aTool
- int - the active toolprotected void updateFont(java.awt.Graphics g)
g
- Graphicspublic void setBackground(java.awt.Color aBackground)
setBackground
in class javax.swing.JComponent
aBackground
- Color - a new background color. If null, then will revert to default background color.public void setForeground(java.awt.Color aForeground)
setForeground
in class javax.swing.JComponent
aForeground
- Color - a new color, if null, then will revert to default foreground colorpublic java.awt.Dimension getPreferredSize()
getPreferredSize
in class javax.swing.JComponent
protected void paintBackground(java.awt.Graphics g, java.awt.Rectangle bounds)
g
- Graphics - graphics to use, may not be nullbounds
- Rectangle - rectangle to use, may not be nullpublic void addPropertyChangeListener(java.beans.PropertyChangeListener aListener)
addPropertyChangeListener
in class javax.swing.JComponent
aListener
- PropertyChangeListener - a new listenerpublic void removePropertyChangeListener(java.beans.PropertyChangeListener aListener)
removePropertyChangeListener
in class javax.swing.JComponent
aListener
- PropertyChangeListener - a listener to remove
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |