|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Canvas
net.xoetrope.deprecated.xui.wmf.XWmf
public class XWmf
Core class for rendering the WMF image. Allows several WMF or WMF graphics files to be played into a single graphics context.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.Canvas |
|---|
java.awt.Canvas.AccessibleAWTCanvas |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static int |
BRUSH
|
static int |
FONT
|
static int |
NULL_BRUSH
|
static int |
NULL_PEN
|
static int |
PALETTE
|
static int |
PEN
|
| 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 | |
|---|---|
XWmf()
Basic constructor, initializes the storage. |
|
XWmf(boolean bInit)
Basic constructor for use by Genny. |
|
| Method Summary | |
|---|---|
void |
add(java.lang.Object c,
java.lang.Object constraint)
Add a child component |
void |
addURL(java.lang.String _url)
Adds a url and reads the corresponding file. |
void |
addUrl(java.net.URL newUrl)
Adds a url and reads the corresponding file. |
void |
drawCrossHairs(java.awt.Graphics g,
int x,
int y)
This method must be called by derived classes at the end of their paint method. |
java.lang.Object |
getChildComponent(int i)
Get a child component |
java.lang.String |
getURL()
Returns the first url if any. |
java.net.URL |
getUrl(int idx)
Returns the current url. |
java.lang.String |
getURL(int idx)
Returns the current url. |
int |
getXPos()
Gets the relative mouse position within bounds of the image taking account of zooming and panning. |
int |
getYPos()
Gets the relative mouse position within bounds of the image taking account of zooming and panning. |
void |
init()
Initializes the storage, add listeners for mouse motion and keyboard handling. |
void |
paint(java.awt.Graphics g)
Renders the WMF image(s). |
void |
pan(int xPercent,
int yPercent)
Pans the image by the specified percentages, withing the range -80 to 20. |
void |
remove(java.lang.Object c)
Remove a child component |
void |
reset()
Resets the internal storage and the coordinate system. |
void |
setContent(java.lang.String content)
Wraps addUrl to allow the url to be set as a string |
void |
setNextAttributes(java.lang.Object attribs)
Set the attributes for the next component being added |
void |
setup(java.lang.String name,
int preferredWidth,
int preferredHeight,
java.util.Hashtable params)
Setup the container |
void |
setXPos(int newXPos)
|
void |
setYPos(int newYPos)
|
void |
zoom(int percent)
Zooms in or out on the image within the range of 25 to 400 percent of the original image size. |
| Methods inherited from class java.awt.Canvas |
|---|
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.xoetrope.xui.XContentHolder |
|---|
doLayout, getName |
| Field Detail |
|---|
public static final int PEN
public static final int BRUSH
public static final int FONT
public static final int NULL_PEN
public static final int NULL_BRUSH
public static final int PALETTE
| Constructor Detail |
|---|
public XWmf()
public XWmf(boolean bInit)
| Method Detail |
|---|
public java.lang.Object getChildComponent(int i)
getChildComponent in interface XContentHolderi - the index of the child within the container
public void setNextAttributes(java.lang.Object attribs)
setNextAttributes in interface XContentHolderattribs - a table of attributes
public void add(java.lang.Object c,
java.lang.Object constraint)
add in interface XContentHolderc - the child componentconstraint - the layout constraintpublic void remove(java.lang.Object c)
remove in interface XContentHolderc - the child component
public void setup(java.lang.String name,
int preferredWidth,
int preferredHeight,
java.util.Hashtable params)
setup in interface XContentHoldername - set the container namepreferredWidth - the desired widthpreferredHeight - the desired heightparams - a table of extra properties
public void init()
throws java.io.IOException
java.io.IOExceptionpublic void reset()
public void paint(java.awt.Graphics g)
paint in class java.awt.Canvaspublic void setContent(java.lang.String content)
setContent in interface XContentHoldercontent - the URL stringpublic void addUrl(java.net.URL newUrl)
public java.net.URL getUrl(int idx)
public void addURL(java.lang.String _url)
public java.lang.String getURL(int idx)
public java.lang.String getURL()
public int getXPos()
public int getYPos()
public void setXPos(int newXPos)
public void setYPos(int newYPos)
public void drawCrossHairs(java.awt.Graphics g,
int x,
int y)
x - the mouse x position.y - the mouse y position.
public void pan(int xPercent,
int yPercent)
xPercent - the amount by which to pan as a percent of the image width.yPercent - the amount by which to pan as a percent of the image height.public void zoom(int percent)
percent - the new size of the image as a percentage of the original size.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||