|
JIU 0.12.0 Homepage | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
net.sourceforge.jiu.gui.awt.JiuAwtFrame
The frame class for the AWT demo program jiuawt
.
Nested Class Summary |
Nested classes inherited from class java.awt.Frame |
Frame.AccessibleAWTFrame |
Nested classes inherited from class java.awt.Window |
Window.AccessibleAWTWindow |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
static String |
APP_NAME
The name of this application, jiuawt, plus the version number taken from JiuInfo .
|
Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface net.sourceforge.jiu.apps.JiuInfo |
JIU_FEEDBACK_ADDRESS, JIU_HOMEPAGE, JIU_NUMERICAL_VERSION, JIU_VERSION |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
JiuAwtFrame(EditorState editorState)
Create an object of this class, using the argument editor state. |
Method Summary | |
void |
actionPerformed(ActionEvent e)
Processes event objects that get created when menu items are picked. |
void |
componentHidden(ComponentEvent e)
|
void |
componentMoved(ComponentEvent e)
|
void |
componentResized(ComponentEvent e)
|
void |
componentShown(ComponentEvent e)
|
void |
maximize()
Maximize the frame on the desktop. |
void |
setDefaultCursor()
Sets the current cursor to be Cursor.DEFAULT_CURSOR . |
void |
setOriginalSize()
If an image is currently loaded, |
void |
setProgress(float progress)
Set a new progress status. |
void |
setProgress(int zeroBasedIndex,
int totalItems)
Sets a new progress level. |
void |
setStatusBar(String text)
|
void |
setWaitCursor()
|
void |
showError(String text)
Displays the argument text in a message box with error in the title bar. |
void |
showInfo(String title,
String text)
Shows a modal dialog with given title bar and message text. |
void |
updateCanvas()
If there is an image loaded, forces a canvas redraw by calling repaint. |
void |
updateImage()
Removes the current canvas from the frame (if there is an image loaded) and creates a new canvas for the current image. |
void |
updateStatusBar()
Creates a description string for the current image and sets the status bar to that text. |
void |
updateTitle()
Sets the frame's title bar to the application name, plus the file name of the currently loaded image file, plus the current zoom factor, plus an optional asterisk in case the image was modified but not yet saved. |
void |
zoomIn()
If an image is currently displayed, zoom in one level. |
void |
zoomOut()
If an image is currently displayed, zoom out one level. |
Methods inherited from class java.awt.Frame |
addNotify, finalize, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
Field Detail |
public static final String APP_NAME
JiuInfo
.
Example: jiuawt 0.8.0
.
Will be displayed in the title bar of this frame.
Constructor Detail |
public JiuAwtFrame(EditorState editorState)
editorState
- EditorState object used by this frameMethod Detail |
public void actionPerformed(ActionEvent e)
MenuIndexConstants
value for a given
event object and calls the internal AwtOperationProcessor
object's process method with the menu value.
The operation will then be performed.
actionPerformed
in interface ActionListener
e
- the ActionEvent objectpublic void componentHidden(ComponentEvent e)
componentHidden
in interface ComponentListener
public void componentMoved(ComponentEvent e)
componentMoved
in interface ComponentListener
public void componentResized(ComponentEvent e)
componentResized
in interface ComponentListener
public void componentShown(ComponentEvent e)
componentShown
in interface ComponentListener
public void maximize()
public void showError(String text)
text
- the error message to be displayedpublic void setDefaultCursor()
Cursor.DEFAULT_CURSOR
.
public void setOriginalSize()
public void setProgress(int zeroBasedIndex, int totalItems)
ProgressListener
Example: if there are three steps and the first one is done, the parameters must be 0 and 3, which will indicated 33% completion. Parameters 1 and 3 mean 66%, 2 and 3 100%. If you use 3 and 3, an IllegalArgumentException will be thrown.
Computes (float)(zeroBasedIndex + 1) / (float)totalItems
and calls
ProgressListener.setProgress(float)
with that value.
setProgress
in interface ProgressListener
zeroBasedIndex
- the index of the step that was just completedtotalItems
- the number of steps in this operationpublic void setProgress(float progress)
setProgress
in interface ProgressListener
progress
- float from 0.0f to 1.0f, indicating the progress between 0 and 100 percentpublic void setStatusBar(String text)
public void setWaitCursor()
public void showInfo(String title, String text)
title
- will be displayed in the dialog's title bartext
- will be displayed in the dialog's center partpublic void updateCanvas()
public void updateImage()
public void updateStatusBar()
public void updateTitle()
public void zoomIn()
public void zoomOut()
|
JIU 0.12.0 Homepage | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |