|
||||||||||
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.TriMeshEditor
public class TriMeshEditor
Interactive triangle-mesh editor specimen.
Nested Class Summary | |
---|---|
protected static class |
TriMeshEditor.State
GUI actions/states. |
Field Summary | |
---|---|
protected Brep |
brep
B-rep database. |
protected static java.lang.String |
CATEGORY
Object category. |
protected int |
columns
Number of triangle columns (horizontal). |
protected int |
ctx2
Context2 used in B-rep (output triangle mesh). |
protected int |
height
Image height in pixels. |
protected GraphicsViewer |
iPreview
Preview window for input image. |
protected int |
nx
New mouse coordinates. |
protected int |
ny
New mouse coordinates. |
protected GraphicsViewer |
oPreview
Preview window for output image. |
protected boolean |
outputActive
Output preview pane is active? |
static RegPiece |
reg
Static registration instance for this class. |
protected int |
rows
Number of triangle rows (vertical). |
protected TriMeshEditor.State |
state
Actual action/state. |
protected static java.lang.String |
TEMPLATE_NAME
Object template identifier. |
protected int |
width
Image width in pixels. |
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 | |
---|---|
TriMeshEditor()
|
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. |
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 GraphicsViewer iPreview
protected GraphicsViewer oPreview
protected Brep brep
protected int ctx2
protected int rows
protected int columns
protected int width
protected int height
protected TriMeshEditor.State state
protected int nx
protected int ny
protected boolean outputActive
protected static final java.lang.String TEMPLATE_NAME
protected static final java.lang.String CATEGORY
public static final RegPiece reg
Constructor Detail |
---|
public TriMeshEditor()
Method Detail |
---|
public boolean fire(int type)
fire
in interface Trigger
type
- The action type (not used).
true
if the action was successful.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 |