|
||||||||||
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
javax.swing.JFrame
courses.dsv2pvt.client.IconEditor
The main window of the IconEditor component. Creates and opens pen and color palette windows. Contains the basic requirements of an IconEditor such as saving, loading and painting.
Nested Class Summary |
Nested classes inherited from class javax.swing.JFrame |
JFrame.AccessibleJFrame |
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 | |
protected JMenu |
AboutMenu
The About menu component with About | Bogus items. |
protected JMenuItem |
AboutMenuItem
The About->About menu item component |
protected JPanel |
backPane
The panel containing all icon components |
protected JRadioButtonMenuItem |
BogusMenuItem
The About->Bogus menu item component that does nothing |
protected courses.dsv2pvt.client.ColorAdapter |
colorAdapter
Adapter connecting the currentColor panel and the color palette |
protected JLabel |
colorLabel
The label containing the text Color |
protected ColPalWin |
colPalWin
Window containing the color palette |
protected JPanel |
currentColor
The panel showing the current color |
protected JMenu |
FileMenu
The File menu component with New | Open | Save | Save as | Quit items. |
protected GridLayout |
iconEditorGridLayout
The GridLayout instance used to manage the position of any subcomponents that the IconEditor may have |
protected JMenuBar |
IconEditorMenu
The menu component with File and About menus. |
protected IconPanel |
iconPanel
The icon panel containing all icon editing functions |
protected JPanel |
iconPanelHolder
The panel containing the icon panel |
protected GridLayout |
iconPanelHolderGridLayout
The GridLayout instance used to manage the position of the iconPanel inside the iconPanelHolder |
protected IconPreviewPanel |
iconPreview
The panel previewing the icon in scale 1:1 |
protected JMenuItem |
NewMenuItem
The File->New menu item component |
protected JMenuItem |
OpenMenuItem
The File->Open menu item component |
protected PenPalWin |
penPalWin
Window containing the pen palette |
protected JLabel |
previewLabel
The label containing the text Preview |
protected JMenuItem |
QuitMenuItem
The File->Quit menu item component |
protected JMenuItem |
SaveAsMenuItem
The File->Save as menu item component |
protected JMenuItem |
SaveMenuItem
The File->Save menu item component |
protected courses.dsv2pvt.client.UpdateAdapter |
updateAdapter
Adapter connecting the preview, the icon panel and the main window |
Fields inherited from class javax.swing.JFrame |
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
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 javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
IconEditor()
Creates a new IconEditor, palettes, palette windows, creates adapters and connects them. |
Method Summary | |
void |
aboutEditor(ActionEvent e)
Invoked upon selection of the About->About menu item. |
Icon |
getIcon()
Retrieves the currently edited icon |
boolean |
loadIcon(File file)
Loads an icon and sets it as the current icon |
static void |
main(String[] args)
Creates an instance of the IconEditor class and displays its windows |
void |
newIcon(ActionEvent e)
Invoked upon selection of the File->New menu item. |
void |
openIcon(ActionEvent e)
Invoked upon selection of the File->Open menu item. |
void |
quitEditor(ActionEvent e)
Invoked upon selection of the File->Quit menu item. |
void |
saveIcon(ActionEvent e)
Invoked upon selection of the File->Save menu item. |
boolean |
saveIcon(File file)
Saves the current icon in the specified file |
void |
saveIconAs(ActionEvent e)
Invoked upon selection of the File->Save as menu item. |
void |
setIcon(Icon icon)
Sets the icon that is to be edited. |
void |
start()
Sets sizes and displays the windows. |
void |
windowActivated(WindowEvent e)
Ignored. |
void |
windowClosed(WindowEvent e)
Exits the editor. |
void |
windowClosing(WindowEvent e)
Hides the palette windows. |
void |
windowDeactivated(WindowEvent e)
Ignored. |
void |
windowDeiconified(WindowEvent e)
Shows the palette windows. |
void |
windowIconified(WindowEvent e)
Hides the palette windows. |
void |
windowOpened(WindowEvent e)
Shows the palette windows. |
Methods inherited from class java.awt.Frame |
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, 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 |
protected JMenuBar IconEditorMenu
protected JMenu FileMenu
protected JMenuItem NewMenuItem
protected JMenuItem SaveMenuItem
protected JMenuItem SaveAsMenuItem
protected JMenuItem QuitMenuItem
protected JMenuItem OpenMenuItem
protected JMenu AboutMenu
protected JMenuItem AboutMenuItem
protected JRadioButtonMenuItem BogusMenuItem
protected GridLayout iconEditorGridLayout
protected GridLayout iconPanelHolderGridLayout
protected JPanel backPane
protected JPanel iconPanelHolder
protected IconPanel iconPanel
protected JPanel currentColor
protected IconPreviewPanel iconPreview
protected JLabel colorLabel
protected JLabel previewLabel
protected courses.dsv2pvt.client.UpdateAdapter updateAdapter
protected courses.dsv2pvt.client.ColorAdapter colorAdapter
protected PenPalWin penPalWin
protected ColPalWin colPalWin
Constructor Detail |
public IconEditor()
Method Detail |
public void start()
public void setIcon(Icon icon)
public Icon getIcon()
public boolean saveIcon(File file)
file
- the file that the icon should be saved to
public boolean loadIcon(File file)
file
- the file containing the icon to be loaded
public static void main(String[] args)
args
- argument vector, ignored by programpublic void newIcon(ActionEvent e)
e
- the system generated action event, ignored by this methodpublic void openIcon(ActionEvent e)
e
- the system generated action event, ignored by this methodpublic void saveIcon(ActionEvent e)
e
- the system generated action event, ignored by this methodpublic void saveIconAs(ActionEvent e)
e
- the system generated action event, ignored by this methodpublic void quitEditor(ActionEvent e)
e
- the system generated action event, ignored by this methodpublic void aboutEditor(ActionEvent e)
e
- the system generated action event, ignored by this methodpublic void windowOpened(WindowEvent e)
windowOpened
in interface WindowListener
e
- an ignored window eventpublic void windowClosing(WindowEvent e)
windowClosing
in interface WindowListener
e
- an ignored window eventpublic void windowClosed(WindowEvent e)
windowClosed
in interface WindowListener
e
- an ignored window eventpublic void windowIconified(WindowEvent e)
windowIconified
in interface WindowListener
e
- an ignored window eventpublic void windowDeiconified(WindowEvent e)
windowDeiconified
in interface WindowListener
public void windowActivated(WindowEvent e)
windowActivated
in interface WindowListener
e
- an ignored window eventpublic void windowDeactivated(WindowEvent e)
windowDeactivated
in interface WindowListener
e
- an ignored window event
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |