|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.jagrlib.DefaultProperty
cz.cuni.jagrlib.Piece
cz.cuni.jagrlib.DefaultInputListener
cz.cuni.jagrlib.testing.WarpingSpecimen
public class WarpingSpecimen
Interactive image filter example - image warping specimen.
Nested Class Summary | |
---|---|
protected static class |
WarpingSpecimen.State
GUI actions/states. |
Field Summary | |
---|---|
protected static java.lang.String |
CATEGORY
Object category. |
protected static int[] |
COLOR
End-point marks' color. |
protected int |
gx
End-point of the actual arrow. |
protected int |
gy
End-point of the actual arrow. |
protected int |
height
Image height in pixels. |
protected int |
hudId
Actual HUD line identifier. |
protected RasterGraphics |
input
Input raster image (for reset). |
protected RasterGraphics |
output
Output raster image. |
protected GraphicsViewer |
preview
Preview window. |
static RegPiece |
reg
Static registration instance for this class. |
protected static int |
SIZE
End-point radius. |
protected WarpingSpecimen.State |
state
Actual action/state. |
protected static java.lang.String |
TEMPLATE_NAME
Object template identifier. |
protected int |
width
Image width in pixels. |
protected int |
x0
Start-point of the actual arrow. |
protected int |
y0
Start-point of the actual arrow. |
Fields inherited from class cz.cuni.jagrlib.Piece |
---|
channels, info, pl, plugs, TEMPLATE_TYPE, userBreak |
Fields inherited from interface cz.cuni.jagrlib.iface.Property |
---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
Fields inherited from interface cz.cuni.jagrlib.iface.InputListener |
---|
BUTTON1, BUTTON2, BUTTON3 |
Constructor Summary | |
---|---|
WarpingSpecimen()
|
Method Summary | |
---|---|
boolean |
fire(int type)
Starts image transformation. |
java.lang.Object |
get(java.lang.String key)
Gets the given property. |
void |
keyboard(java.lang.Object sender,
long when,
boolean press,
char ch,
int keyCode,
int flags)
Keyboard key was pressed/released. |
void |
mouseButton(java.lang.Object sender,
long when,
int x,
int y,
int button,
boolean press,
int flags)
Mouse button was pressed/released. |
void |
mouseMove(java.lang.Object sender,
long when,
int x,
int y,
int flags)
Mouse pointer was moved. |
protected void |
resetImage()
Re-initializes the output image. |
void |
set(java.lang.String key,
java.lang.Object value)
Sets the given property. |
static int |
setTemplate(Template t,
int ord)
General-purpose registration routine. |
void |
windowClose(java.lang.Object sender)
Window was closed (user interaction..). |
Methods inherited from class cz.cuni.jagrlib.DefaultInputListener |
---|
mouseHover, mouseWheel, setWindowSize |
Methods inherited from class cz.cuni.jagrlib.Piece |
---|
className, connect, findPlug, findPlug, getInfo, getInterface, getInterface, getPlug, getReg, init, isCompatible, isCompatible, isConnected, logError, logWarning, myInterface, newInputPlug, newOptOutputPlug, newOutputPlug, newPlug, noTemplates, propBegin, propBounds, propDefault, propEnd, propEnum, propManipulator, propManipulator, setProgressListener, setRegStrings, setTemplateDynamic, stop |
Methods inherited from class cz.cuni.jagrlib.DefaultProperty |
---|
booleanProperty, booleanProperty, colorDoubleProperty, colorProperty, commit, doubleProperty, doubleProperty, doubleProperty, enumProperty, floatProperty, floatProperty, floatProperty, intProperty, intProperty, intProperty, longProperty, longProperty, longProperty, set, stringProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface cz.cuni.jagrlib.iface.Property |
---|
commit |
Methods inherited from interface cz.cuni.jagrlib.Breakable |
---|
setProgressListener, stop |
Field Detail |
---|
protected RasterGraphics input
protected RasterGraphics output
protected GraphicsViewer preview
protected int width
protected int height
protected WarpingSpecimen.State state
protected int hudId
protected int x0
protected int y0
protected int gx
protected int gy
protected static final int[] COLOR
protected static final int SIZE
protected static final java.lang.String TEMPLATE_NAME
protected static final java.lang.String CATEGORY
public static final RegPiece reg
Constructor Detail |
---|
public WarpingSpecimen()
Method Detail |
---|
protected void resetImage()
public boolean fire(int type)
fire
in interface Trigger
type
- The action type (0 .. initial rendering, 1 .. message loop).
public void mouseButton(java.lang.Object sender, long when, int x, int y, int button, boolean press, int flags)
mouseButton
in interface InputListener
mouseButton
in class DefaultInputListener
sender
- Originator of the eventwhen
- System time in milliseconds.x
- Horizontal screen position in pixels.y
- Vertical screen position in pixels.button
- Button number (InputListener.BUTTON1
, etc.).press
- Was it press or release?flags
- Input system status (key shifts/alts, ..).public void keyboard(java.lang.Object sender, long when, boolean press, char ch, int keyCode, int flags)
keyboard
in interface InputListener
keyboard
in class DefaultInputListener
sender
- Originator of the eventwhen
- System time in milliseconds.press
- Was it press or release?ch
- Character represented by the key.keyCode
- Key code.flags
- Input system status (key shifts/alts, ..).public void mouseMove(java.lang.Object sender, long when, int x, int y, int flags)
mouseMove
in interface InputListener
mouseMove
in class DefaultInputListener
sender
- Originator of the eventwhen
- System time in milliseconds.x
- Horizontal screen position in pixels.y
- Vertical screen position in pixels.flags
- Input system status (key shifts/alts, ..).public void windowClose(java.lang.Object sender)
windowClose
in interface InputListener
windowClose
in class DefaultInputListener
sender
- Originator of the eventpublic void set(java.lang.String key, java.lang.Object value)
set
in interface Property
set
in class DefaultProperty
key
- Key string.value
- The new value.Property.commit()
public java.lang.Object get(java.lang.String key)
get
in interface Property
get
in class DefaultProperty
key
- Key string.
public static int setTemplate(Template t, int ord)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |