|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.micropainter.core.tool.AbstractTool
public abstract class AbstractTool
define an abstract tool and fundamentals controls
| Nested Class Summary | |
|---|---|
class |
AbstractTool.KeyboardAction
Keyboard action mapping |
| Field Summary | |
|---|---|
private Antialiasing |
antialiasing
aliasing |
private java.util.Vector<ToolControl> |
controls
tool controls |
private Fractional |
fractional
fractional |
private Interpolation |
interpolation
interpolation |
private java.util.Vector<AbstractTool.KeyboardAction> |
keyboardActions
keyboard actions |
private javax.swing.event.EventListenerList |
listenerList
listeners |
private boolean |
lockSelected
lock selected |
private java.lang.String |
name
the tool name |
private AbstractTool |
parentTool
parent tool |
private java.util.Vector<AbstractTool> |
subTools
sub tools |
private TextAntialiasing |
textAntialiasing
text aliasing |
private View2D |
view2D
the view where this tool instance is registred |
| Constructor Summary | |
|---|---|
AbstractTool()
|
|
| Method Summary | |
|---|---|
void |
addToolListener(ToolListener listener)
add a tool listener of this tool |
private void |
fireControlStateChanged()
fire a state changed |
Antialiasing |
getAntialiasing()
return true if anti alias is required, false otherwise |
java.util.Vector<ToolControl> |
getControls()
get the tool controls |
java.util.Vector<ToolControl> |
getControls(int toolControlType)
get the tool control with specified type |
Fractional |
getFractional()
return Fractional |
Interpolation |
getInterpolation()
get the interpolation |
java.util.Vector<AbstractTool.KeyboardAction> |
getKeyboardActions()
get the keyboard action |
java.lang.String |
getName()
get the tool name |
AbstractTool |
getParentTool()
get the parent tool |
java.util.Vector<AbstractTool> |
getSubTools()
get the sub tools that have been registered in window |
TextAntialiasing |
getTextAntialiasing()
get the text antialiasing * |
View2D |
getView2D()
get view2D |
abstract void |
interceptKeyPressed(java.awt.event.KeyEvent e)
|
abstract void |
interceptKeyReleased(java.awt.event.KeyEvent e)
|
abstract void |
interceptKeyTyped(java.awt.event.KeyEvent e)
|
abstract void |
interceptMouseClicked(java.awt.event.MouseEvent e)
intercept the device mouse clicked |
abstract void |
interceptMouseDragged(java.awt.event.MouseEvent e)
intercept the device mouse dragged event |
abstract void |
interceptMouseEntered(java.awt.event.MouseEvent e)
intercept the device mouse entered |
abstract void |
interceptMouseExited(java.awt.event.MouseEvent e)
intercept the device mouse exited |
abstract void |
interceptMouseMoved(java.awt.event.MouseEvent e)
intercept the device mouse move |
abstract void |
interceptMousePressed(java.awt.event.MouseEvent e)
intercept the device mouse entered |
abstract void |
interceptMouseReleased(java.awt.event.MouseEvent e)
intercept the device mouse released |
abstract void |
interceptMouseWheelMoved(java.awt.event.MouseWheelEvent e)
intercept the device mouse wheel |
boolean |
isLockSelected()
return true if tool is selected , false otherwise |
void |
lockSelected()
lock select the tool and fire event for toolListener |
void |
paint(java.awt.Graphics2D g2d)
|
abstract void |
paintTool(java.awt.Graphics2D g2d)
paint the tool in device |
void |
registerControl(ToolControl toolControl)
register the specified tool control |
void |
registerKeyboardAction(javax.swing.AbstractAction action,
javax.swing.KeyStroke ks,
int condition)
register a keyboard action mapping within tool action and keyboard input |
void |
registerSubTool(AbstractTool subTool)
register subTool for this tool |
void |
setAntialiasing(Antialiasing antialiasing)
set the antialiasing |
void |
setFractional(Fractional fractional)
set the fractional |
void |
setInterpolation(Interpolation interpolation)
set the interpolation |
void |
setKeyboardActions(java.util.Vector<AbstractTool.KeyboardAction> keyboardActions)
set the keyboard actions |
void |
setName(java.lang.String name)
set tool name |
void |
setParentTool(AbstractTool parentTool)
set the parent tool |
private void |
setQuality(java.awt.Graphics2D g2d)
set the rendering quality for painting this layout |
void |
setTextAntialiasing(TextAntialiasing textAntialiasing)
set the text antialiasing |
void |
setView2D(View2D view2D)
set viewd2D |
void |
unlockSelected()
unlock the tool |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.lang.String name
private View2D view2D
private AbstractTool parentTool
private java.util.Vector<AbstractTool> subTools
private javax.swing.event.EventListenerList listenerList
private boolean lockSelected
private java.util.Vector<AbstractTool.KeyboardAction> keyboardActions
private java.util.Vector<ToolControl> controls
private Interpolation interpolation
private Antialiasing antialiasing
private TextAntialiasing textAntialiasing
private Fractional fractional
| Constructor Detail |
|---|
public AbstractTool()
| Method Detail |
|---|
public AbstractTool getParentTool()
public void setParentTool(AbstractTool parentTool)
parentTool - public View2D getView2D()
public void setView2D(View2D view2D)
view2D - public abstract void interceptMouseDragged(java.awt.event.MouseEvent e)
e - public abstract void interceptMouseMoved(java.awt.event.MouseEvent e)
e - public abstract void interceptMouseClicked(java.awt.event.MouseEvent e)
e - public abstract void interceptMouseEntered(java.awt.event.MouseEvent e)
e - public abstract void interceptMouseExited(java.awt.event.MouseEvent e)
e - public abstract void interceptMousePressed(java.awt.event.MouseEvent e)
e - public abstract void interceptMouseReleased(java.awt.event.MouseEvent e)
e - public abstract void interceptMouseWheelMoved(java.awt.event.MouseWheelEvent e)
e - public abstract void interceptKeyPressed(java.awt.event.KeyEvent e)
public abstract void interceptKeyReleased(java.awt.event.KeyEvent e)
public abstract void interceptKeyTyped(java.awt.event.KeyEvent e)
public abstract void paintTool(java.awt.Graphics2D g2d)
g2d - public final void paint(java.awt.Graphics2D g2d)
public void lockSelected()
private void fireControlStateChanged()
public void unlockSelected()
public boolean isLockSelected()
public java.lang.String getName()
public void setName(java.lang.String name)
name - public java.util.Vector<AbstractTool.KeyboardAction> getKeyboardActions()
public void setKeyboardActions(java.util.Vector<AbstractTool.KeyboardAction> keyboardActions)
keyboardActions - public Interpolation getInterpolation()
public void setInterpolation(Interpolation interpolation)
value - public Antialiasing getAntialiasing()
public void setAntialiasing(Antialiasing antialiasing)
antialias - public void setFractional(Fractional fractional)
fractional - public Fractional getFractional()
public TextAntialiasing getTextAntialiasing()
public void setTextAntialiasing(TextAntialiasing textAntialiasing)
textAntialiasing - private void setQuality(java.awt.Graphics2D g2d)
g2d -
public void registerKeyboardAction(javax.swing.AbstractAction action,
javax.swing.KeyStroke ks,
int condition)
action - ks - condition - public void registerControl(ToolControl toolControl)
the - tool control to registeredpublic java.util.Vector<ToolControl> getControls()
public java.util.Vector<ToolControl> getControls(int toolControlType)
public void registerSubTool(AbstractTool subTool)
subTool - public java.util.Vector<AbstractTool> getSubTools()
public void addToolListener(ToolListener listener)
listener -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||