uci.gef
Class ModeCreateFigImage
java.lang.Object
|
+--uci.gef.Mode
|
+--uci.gef.ModeCreate
|
+--uci.gef.ModeCreateFigImage
- public class ModeCreateFigImage
- extends ModeCreate
A Mode to interpert user input while creating a FigImage. All of
the actual event handling is inherited from ModeCreate. This class
just implements the differences needed to make it specific to
images.
- See Also:
- Serialized Form
|
Field Summary |
protected Image |
_image
The image to be placed. |
| Methods inherited from class uci.gef.Mode |
canExit,
done,
getArg,
getArgs,
getEditor,
keyPressed,
keyReleased,
keyTyped,
mouseClicked,
print,
setArg,
setArgs,
setCursor,
setEditor,
start |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
_image
protected Image _image
- The image to be placed.
ModeCreateFigImage
public ModeCreateFigImage()
image
public Image image()
- get and set the image to be used for the new FigImage.
image
public void image(Image i)
instructions
public String instructions()
- Overrides:
- instructions in class Mode
createNewItem
public Fig createNewItem(MouseEvent me,
int snapX,
int snapY)
- Create a new FigImage instance based on the given mouse down
event and the state of the parent Editor.
- Overrides:
- createNewItem in class ModeCreate
mouseEntered
public void mouseEntered(MouseEvent me)
- When the mouse enters an Editor, create the FigImage and place
it at the mouse position.
- Overrides:
- mouseEntered in class Mode
mouseExited
public void mouseExited(MouseEvent me)
- When the mouse exits the editor, clean up the display a little.
- Overrides:
- mouseExited in class Mode
mousePressed
public void mousePressed(MouseEvent me)
- On mouse down, do nothing.
- Overrides:
- mousePressed in class ModeCreate
mouseMoved
public void mouseMoved(MouseEvent me)
- Whem the user drags or moves the mouse, move the FigImage to the
current mouse position.
- Overrides:
- mouseMoved in class Mode
mouseDragged
public void mouseDragged(MouseEvent me)
- Exactly the same as mouseMove.
- Overrides:
- mouseDragged in class ModeCreate