|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
gov.noaa.pmel.sgt.beans.Panel
public class Panel
A Layer
container that provides a StackedLayout
of
the Layer
s.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
Panel(PanelHolder ph)
Panel constructor with PanelHolder argument. |
|
Panel(java.lang.String name)
Panel constructor. |
Method Summary | |
---|---|
void |
addData(SGTData data,
Attribute attr,
DataGroup dataGroup,
Legend legend)
Add data to this Panel and DataGroup . |
void |
draw(java.awt.Graphics g)
Used internally by sgt. |
void |
drawDraggableItems(java.awt.Graphics g)
Used internally by sgt. |
DataGroupLayer |
findDataGroupLayer(java.lang.String id)
Find DataGroupLayer in Panel . |
java.lang.String |
getId()
Get the identifier for the Panel |
Layer |
getLayer(java.lang.String id)
Get Layer from this Panel . |
Layer |
getLayerFromDataId(java.lang.String id)
Get Layer from this Panel . |
java.lang.Object |
getObjectAt(int x,
int y,
boolean check)
Find object associated with a MOUSE_DOWN event. |
java.lang.Object[] |
getObjectsAt(int x,
int y,
boolean check)
Find objects associated with a MOUSE_DOWN event. |
JPane |
getPane()
Get the JPane the Panel is associated
with. |
boolean |
hasLayer(java.lang.String id)
Does this Panel contain this Layer? |
boolean |
isDataInPanel(java.lang.String id)
Checks to see if a data id matches that data attached to the Graph . |
void |
resetZoom()
Reset the zoom for all DataGroupLayer s in this Panel . |
void |
setClipping(boolean clip)
Set clipping for DataGroupLayer s in this Panel . |
void |
setPane(AbstractPane pane)
Set the Pane the Panel is associated with. |
void |
setPanelHolder(PanelHolder ph)
Set PanelHolder . |
java.lang.String |
toString()
Get a String representation of the
Layer . |
void |
update()
Traverses the PanelHolder and adds any new objects and
updates exisiting objects. |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, 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, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Panel(java.lang.String name)
Panel
constructor. PanelHolder
will need to be
set.
name
- Panel namepublic Panel(PanelHolder ph)
Panel
constructor with PanelHolder
argument.
Panel
name set from PanelHolder
identifier.
ph
- PanelHolderMethod Detail |
---|
public void setPanelHolder(PanelHolder ph)
PanelHolder
. PanelHolder
contains the layout
information and DataGroup
s associated with the Panel
.
ph
- PanelHolderpublic void update()
PanelHolder
and adds any new objects and
updates exisiting objects.
public java.lang.Object getObjectAt(int x, int y, boolean check)
x
- mouse coordinatey
- mouse coordinatecheck
- if true requires that object isSelectable
public void resetZoom()
DataGroupLayer
s in this Panel
.
public void setClipping(boolean clip)
DataGroupLayer
s in this Panel
.
clip
- if true clip data to bounds.public boolean hasLayer(java.lang.String id)
Panel
contain this Layer?
id
- layer identification
public Layer getLayer(java.lang.String id)
Layer
from this Panel
. Returns null
if Layer is not found.
id
- Layer identifier
public boolean isDataInPanel(java.lang.String id)
Graph
.
id
- data identifier
public Layer getLayerFromDataId(java.lang.String id)
Layer
from this Panel
. Returns null
if Layer is not found.
id
- SGTData identifier
public java.lang.Object[] getObjectsAt(int x, int y, boolean check)
x
- mouse coordinatey
- mouse coordinatecheck
- if selectable
public DataGroupLayer findDataGroupLayer(java.lang.String id)
DataGroupLayer
in Panel
.
id
- DataGroupLayer identifier
public JPane getPane()
JPane
the Panel
is associated
with.
Pane
public void setPane(AbstractPane pane)
Pane
the Panel
is associated with.
This method is called by Pane
when the
Pane.add
method is exectued.
setPane
in interface LayerControl
pane
- The Pane
public void draw(java.awt.Graphics g) throws PaneNotFoundException
LayerControl
draw
in interface LayerControl
g
- Graphics object
PaneNotFoundException
- Pane not found.public void drawDraggableItems(java.awt.Graphics g) throws PaneNotFoundException
LayerControl
drawDraggableItems
in interface LayerControl
g
- Graphics object.
PaneNotFoundException
- Pane not found.public void addData(SGTData data, Attribute attr, DataGroup dataGroup, Legend legend) throws DataTargetMismatchException
Panel
and DataGroup
. legend can
be null
.
data
- SGTData to be addedattr
- AttributedataGroup
- DataGroup to add data tolegend
- Lenged for data
DataTargetMismatchException
public java.lang.String getId()
Panel
getId
in interface LayerControl
public java.lang.String toString()
String
representation of the
Layer
.
toString
in class java.awt.Component
String
representation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |