|
||||||||||
| 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
jview.JImageSlice
public class JImageSlice
The mouse follows the cursor and takes a slice of the viewport image assigned to the parent viewport.
| Nested Class Summary |
|---|
| 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 | |
|---|---|
private JViewportCanvas |
canvas
The reference to the viewport. |
private Point2D |
center
Normalized coordinates of last mouse move. |
private static boolean |
DEFWORKBACKGROUND
Per default, we work on the background. |
private static int |
DEFXSLICE
Default slice size. |
private static int |
DEFYSLICE
Default slice size. |
private static boolean |
DEFZOOMDISPLAYED
Per default, we do not consider image zooms on display. |
private static int |
DEFZOOMSLICE
Default image slice zoom factor. |
private PropertySupplying |
info
My properties. |
static String |
KEY_WORKBACKGROUND
Work on background or on viewport image. |
static String |
KEY_XSLICE
Image slice size and display size |
static String |
KEY_YSLICE
Image slice size and display size |
static String |
KEY_ZOOMDISPLAYED
If true, consider display zoom of sliced image |
static String |
KEY_ZOOMSLICE
The zoom factor on the image slice. |
private Dimension |
mysize
My size for convenience. |
private Dimension |
myslice
My slice size for convenience. |
private BufferedImage |
slice
The buffered image from the viewport. |
private Rectangle |
slicesize
And the size. |
| 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 java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JImageSlice(JViewportCanvas view)
Constructs a new image slice from a viewport component. |
|
| Method Summary | |
|---|---|
PropertySupplying |
getComposedProperties()
Returns my properties. |
Dimension |
getMaximumSize()
Returns the slice size. |
Dimension |
getMinimumSize()
Returns the slice size. |
Dimension |
getPreferredSize()
Returns the slice size. |
void |
mouseDragged(MouseEvent me)
Called when the maous is dragged. |
void |
mouseMoved(MouseEvent me)
Called when the mouse is moved. |
void |
paintComponent(Graphics g)
Paints the component. |
void |
propertyChange(PropertyChangeEvent e)
Notified when a viewport image has changed. |
void |
setComposedProperties(PropertySupplying prop)
Constitutes my properties. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String KEY_XSLICE
public static final String KEY_YSLICE
public static final String KEY_ZOOMSLICE
public static final String KEY_WORKBACKGROUND
public static final String KEY_ZOOMDISPLAYED
private static final int DEFXSLICE
private static final int DEFYSLICE
private static final int DEFZOOMSLICE
private static final boolean DEFWORKBACKGROUND
private static final boolean DEFZOOMDISPLAYED
private PropertySupplying info
private JViewportCanvas canvas
private BufferedImage slice
private Rectangle slicesize
private Dimension mysize
private Dimension myslice
private Point2D center
| Constructor Detail |
|---|
public JImageSlice(JViewportCanvas view)
| Method Detail |
|---|
public void setComposedProperties(PropertySupplying prop)
setComposedProperties in interface PropertyAwarepublic PropertySupplying getComposedProperties()
getComposedProperties in interface PropertyComposedpublic Dimension getPreferredSize()
getPreferredSize in class JComponentpublic Dimension getMaximumSize()
getMaximumSize in class JComponentpublic Dimension getMinimumSize()
getMinimumSize in class JComponentpublic void propertyChange(PropertyChangeEvent e)
propertyChange in interface PropertyChangeListenerpublic void mouseMoved(MouseEvent me)
mouseMoved in interface MouseMotionListenerpublic void mouseDragged(MouseEvent me)
mouseDragged in interface MouseMotionListenerpublic void paintComponent(Graphics g)
paintComponent in class JComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||