|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JLayeredPane org.freehep.swing.graphics.StackedPanel
StackedPanel defines an extension to JLayeredPane which allows a set of equally-sized, overlayed panels to form a single 2D surface on which to draw.
Nested Class Summary | |
protected class |
StackedPanel.PanelArray
A protected class which simply wraps the set of Panels which form the sublayers of a particular layer. |
Nested classes inherited from class javax.swing.JLayeredPane |
JLayeredPane.AccessibleJLayeredPane |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
static Integer |
INTERACTION_LAYER
Layer intended for interaction with the user. |
static Integer |
MAXIMUM_LAYER
One larger than the maximum allowed layer for components. |
static Integer |
MINIMUM_LAYER
The lowest allowed value for components. |
static String |
NEED_GRAPHICAL_SELECTION_PANEL
An error message indicating that the class passed into addGraphicalSelectionPanelOfClass method was not a type of GraphicalSelectionPanel. |
Fields inherited from class javax.swing.JLayeredPane |
DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER |
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 | |
StackedPanel()
This constructor makes a new stacked panel which has no PanelArtist associated with it. |
|
StackedPanel(AbstractPanelArtist panelArtist)
The constructor allocates all of the panels for drawing. |
Method Summary | |
void |
activateGraphicalSelectionPanel(GraphicalSelectionPanel panel)
Make a given GraphicalSelectionPanel active. |
void |
activateGraphicalSelectionPanelOfClass(Class c)
Make the GraphicalSelectionPanel of the given class active. |
void |
addGraphicalSelectionPanel(GraphicalSelectionPanel panel)
Add an interaction component. |
void |
addLayer(String layerName,
int sublayers,
boolean opaque)
A routine which adds a new layer to this StackedPanel. |
void |
addLayer(String layerName,
JComponent panel)
adds a Panel as layer to this StackedPanel |
void |
addLayer(String layerName,
JComponent[] panels)
adds a set of Panels as layer and sublayers to this StackedPanel |
void |
clearAllLayers()
This provides a method for PanelArtists to clear all layers. |
void |
clearLayer(String layerName)
This provides a method for PanelArtists to clear a layer. |
void |
deactivateGraphicalSelectionPanels()
Make all GraphicalSelectionPanels inactive. |
void |
drawComplete()
This callback routine is intended to be used by the controlling PanelArtist after it has returned false from the drawPanel() method, indicating that the redraw of the panel has not yet completed. |
void |
getGraphics(String layerName,
Graphics[] g)
This provides an additional getGraphics method which returns the graphics object associated with the image of the given layer. |
AbstractPanelArtist |
getPanelArtist()
Return the PanelArtist which controls the graphics content of this panel. |
long |
getUpdatePeriod()
Get the delay for the periodic update of the display. |
boolean |
isRedrawNeeded()
Return a boolean indicating whether or not this panel will be completely redrawn at the next repaint. |
void |
paint(Graphics g)
|
void |
paintChildren(Graphics g)
|
void |
paintComponent(Graphics g)
Override of the paintComponent() method ensures that the drawPanel() method will be called if a complete redraw is needed. |
void |
printComponent(Graphics g)
This prints this StackedPanel. |
void |
propertyChange(PropertyChangeEvent evt)
Look for changes in property values. |
void |
removeGraphicalSelectionPanel(GraphicalSelectionPanel panel)
Remove an interaction component. |
void |
removeLayer(String layerName)
Remove a layer from the stacked panel. |
void |
reorderLayers()
Reorder the layers. |
void |
setAntialias(String layerName,
boolean antialias)
This sets the anti-aliasing on or off for the given layer. |
void |
setBorder(Border border)
Set the border of this component. |
void |
setBounds(int x,
int y,
int w,
int h)
Intercept a resize event so that the redraw flag can be set. |
void |
setPanelArtist(AbstractPanelArtist panelArtist)
Set which PanelArtist will control the graphics content of this panel. |
void |
setRedrawNeeded(boolean redrawNeeded)
Set the redraw flag. |
void |
setUpdatePeriod(int period)
Set the delay for the periodic update of the display. |
void |
setVisible(String layerName,
boolean[] visible)
Tell the component whether or not a given layer is visible. |
protected void |
startPeriodicUpdate()
Start a periodic update of this panel. |
protected void |
stopPeriodicUpdate()
Stop the periodic update of this panel. |
Methods inherited from class javax.swing.JLayeredPane |
addImpl, getAccessibleContext, getComponentCountInLayer, getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, paramString, putLayer, remove, setLayer, setLayer, setPosition |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String NEED_GRAPHICAL_SELECTION_PANEL
public static final Integer INTERACTION_LAYER
public static final Integer MINIMUM_LAYER
public static final Integer MAXIMUM_LAYER
Constructor Detail |
public StackedPanel()
public StackedPanel(AbstractPanelArtist panelArtist)
Method Detail |
public void addLayer(String layerName, int sublayers, boolean opaque)
public void addLayer(String layerName, JComponent panel)
public void addLayer(String layerName, JComponent[] panels)
public void removeLayer(String layerName)
public void reorderLayers()
public void addGraphicalSelectionPanel(GraphicalSelectionPanel panel)
public void removeGraphicalSelectionPanel(GraphicalSelectionPanel panel)
public void activateGraphicalSelectionPanelOfClass(Class c) throws InstantiationException, IllegalAccessException
InstantiationException
IllegalAccessException
public void activateGraphicalSelectionPanel(GraphicalSelectionPanel panel)
public void deactivateGraphicalSelectionPanels()
public void setVisible(String layerName, boolean[] visible)
layerName
- String describing a particular layervisible
- true if layer should be visible, false otherwisepublic void setPanelArtist(AbstractPanelArtist panelArtist)
panelArtist
- PanelArtist which provides the graphics
contentpublic AbstractPanelArtist getPanelArtist()
public boolean isRedrawNeeded()
public void setRedrawNeeded(boolean redrawNeeded)
public void getGraphics(String layerName, Graphics[] g)
public void clearAllLayers()
public void clearLayer(String layerName)
public void setAntialias(String layerName, boolean antialias)
public void paint(Graphics g)
public void paintChildren(Graphics g)
public void paintComponent(Graphics g)
public void printComponent(Graphics g)
public void drawComplete()
public void setUpdatePeriod(int period)
public long getUpdatePeriod()
protected void startPeriodicUpdate()
protected void stopPeriodicUpdate()
public void setBorder(Border border)
public void setBounds(int x, int y, int w, int h)
public void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |