|
|||||||||
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.JLabel
javamorph.CFrame
public class CFrame
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JLabel |
---|
JLabel.AccessibleJLabel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static Color |
BACKGROUND
Background color of this component. |
private double[][] |
clip
Polygon's smoothed clip matrix. |
private CMeshDecorator |
dmesh
Decorator to draw & edit the morph mesh. |
private CPictureDecorator |
dpicture
Decorator to draw & edit the picture as subject of this program. |
private CPolygonDecorator |
dpolygon
Decorator to draw & edit the clip polygon. |
private CPopupMenuDecorator |
dpopup
Decorator to provide the pop up menu. |
static int |
EDIT_MESH
Constant for pop up menu edit command: Edit the mesh. |
static int |
EDIT_POLYGON
Constant for pop up menu edit command: Edit the polygon. |
private File |
f_clip
File to store a debug copy of the clip matrix. |
private BufferedImage |
image
Picture itself. |
private Vector<Point> |
mesh
Picture's mesh. |
private BufferedImage |
moffline
Double buffer image to avoid flickering effects. |
private CMain |
parent
Parent frame which lays out this component. |
private Vector<Point> |
polygon
Picture's clip polygon points. |
static Dimension |
PREF_SIZE
Preferred paint size of this component. |
private static long |
serialVersionUID
Java API. |
Fields inherited from class javax.swing.JLabel |
---|
labelFor |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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 javax.swing.SwingConstants |
---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
CFrame(CMain parent,
Vector<Point> mesh,
Vector<Point> polygon,
BufferedImage image,
double[][] clip,
File f_mesh,
File f_polygon,
File f_clip)
Constructor. |
Method Summary | |
---|---|
void |
genClip()
|
Rectangle |
getImageBounds()
Return the position & the size of the drawn image within the component. |
CMain |
getParent()
Obtain the instance of the application's main class. |
Dimension |
getPreferredSize()
Java API. |
void |
initMesh()
Delete content of mesh. |
void |
initPolygon()
Delete polygon. |
void |
paint(Graphics g)
Paint this component to the screen. |
int |
scaleMarkSize()
Scale mark & cursor size simultan. |
void |
scalePoint(Point p)
Scale a screen point to a picture point. |
void |
update(Graphics g)
Java API. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
public static final Dimension PREF_SIZE
public static final Color BACKGROUND
public static final int EDIT_MESH
public static final int EDIT_POLYGON
private CMain parent
private CMeshDecorator dmesh
private CPictureDecorator dpicture
private CPolygonDecorator dpolygon
private CPopupMenuDecorator dpopup
private BufferedImage moffline
private Vector<Point> mesh
private Vector<Point> polygon
private BufferedImage image
private double[][] clip
private File f_clip
Constructor Detail |
---|
public CFrame(CMain parent, Vector<Point> mesh, Vector<Point> polygon, BufferedImage image, double[][] clip, File f_mesh, File f_polygon, File f_clip)
parent
- Main JFrame.mesh
- Picture's mesh.polygon
- Clip polygon points.image
- Picture itself.clip
- Smoothed clip matrix.f_mesh
- File to store to mesh to.f_polygon
- File to store the polygon to.f_clip
- File to debug the smoothed clip matrix to.Method Detail |
---|
public void paint(Graphics g)
paint
in class JComponent
public void update(Graphics g)
update
in class JComponent
public Dimension getPreferredSize()
getPreferredSize
in class JComponent
public Rectangle getImageBounds()
public CMain getParent()
getParent
in class Component
public void genClip()
public void scalePoint(Point p)
p
- Point in screen resolution units.public int scaleMarkSize()
public void initMesh()
public void initPolygon()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |