|
||||||||||
| 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
javax.swing.JPanel
org.freehep.swing.graphics.GraphicalSelectionPanel
public class GraphicalSelectionPanel
The primary superclass of all graphical selection panels. These panels are expected to handle all of the interaction with the user, and generate a GraphicalSelectionEvent when a selection has been made. Note that GraphicalSelectionPanels use the information about the size of the component to send back meaningful zoom transformation and the like. To keep these calculations simple, Borders are not allowed on these components. If a Border is desired, then embed the selection panel within a container and put the Border on the container.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.BaselineResizeBehavior |
| Field Summary |
|---|
| 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 | |
|---|---|
GraphicalSelectionPanel()
Creates a selection panel which is transparent. |
|
| Method Summary | |
|---|---|
void |
addGraphicalSelectionListener(GraphicalSelectionListener listener)
Add a GraphicalSelectionListener. |
Border |
getBorder()
This component does not support borders. |
JPopupMenu |
getPopupMenu()
This method returns the popup menu for this component. |
boolean |
isProcessingPopup(MouseEvent e)
This method determines whether or not a popup menu is being processed. |
void |
keyPressed(KeyEvent e)
Invoked when a key has been pressed. |
void |
keyReleased(KeyEvent e)
Process key-released events. |
void |
keyTyped(KeyEvent e)
Invoked when a key has been typed. |
void |
mouseClicked(MouseEvent e)
Invoked when the mouse has been clicked on a component. |
void |
mouseDragged(MouseEvent e)
Invoked when a mouse button is pressed on a component and then dragged. |
void |
mouseEntered(MouseEvent e)
Invoked when the mouse enters a component. |
void |
mouseExited(MouseEvent e)
Invoked when the mouse exits a component. |
void |
mouseMoved(MouseEvent e)
Invoked when the mouse button has been moved on a component (with no buttons down). |
void |
mousePressed(MouseEvent e)
Invoked when the mouse button has been pressed on a component. |
void |
mouseReleased(MouseEvent e)
Invoked when a mouse button has been released on a component. |
void |
removeGraphicalSelectionListener(GraphicalSelectionListener listener)
Remove a GraphicalSelectionListener. |
void |
resetSelection()
The default implementation of this method does nothing. |
void |
setBorder(Border border)
This component does not support borders. |
void |
setBounds(int x,
int y,
int width,
int height)
Moves and resizes this component. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GraphicalSelectionPanel()
| Method Detail |
|---|
public void resetSelection()
public JPopupMenu getPopupMenu()
public boolean isProcessingPopup(MouseEvent e)
e - MouseEvent passed into mouse handling routine
public final void setBorder(Border border)
setBorder in class JComponentborder - must be nullpublic final Border getBorder()
getBorder in class JComponent
public void setBounds(int x,
int y,
int width,
int height)
setBounds in class Componentx - x-coordinate of componenty - y-coordinate of componentwidth - width of the componentheight - height of the componentpublic void addGraphicalSelectionListener(GraphicalSelectionListener listener)
listener - the GraphicalSelectionListener to addpublic void removeGraphicalSelectionListener(GraphicalSelectionListener listener)
listener - the GraphicalSelectionListener to removepublic void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenere - MouseEvent describing actionpublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenere - MouseEvent describing actionpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenere - MouseEvent describing actionpublic void mousePressed(MouseEvent e)
mousePressed in interface MouseListenere - MouseEvent describing actionpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenere - MouseEvent describing actionpublic void mouseDragged(MouseEvent e)
mouseDragged in interface MouseMotionListenere - MouseEvent describing actionpublic void mouseMoved(MouseEvent e)
mouseMoved in interface MouseMotionListenere - MouseEvent describing actionpublic void keyPressed(KeyEvent e)
keyPressed in interface KeyListenere - KeyEvent describing key which has been pressed.public void keyReleased(KeyEvent e)
keyReleased in interface KeyListenere - KeyEvent describing the key which has been releasedpublic void keyTyped(KeyEvent e)
keyTyped in interface KeyListenere - KeyEvent describing key which has been typed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||