|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nl.coderight.jazz.View
public abstract class View
View
is part of the HMVC pattern.
The view represents the user interface.
Default event-handlers:
FormView
,
Controller.setView(View)
,
Controller.showView()
,
Controller.closeView()
,
Controller.onBeforeShowView()
,
Controller.onAfterShowView()
Nested Class Summary | |
---|---|
static class |
View.Position
Enumeration of possible View positions. |
Constructor Summary | |
---|---|
View()
Default constructor. |
Method Summary | |
---|---|
BufferedImage |
capture()
Returns an Image (screenshot) of this View . |
void |
center()
Center View on parent. |
void |
center(View.Position position)
Center View with given position. |
void |
close()
|
protected void |
dispose()
Invoked when view is closed. |
void |
focus()
|
JPanel |
getComponent()
|
Cursor |
getCursor()
|
JButton |
getDefaultButton()
|
Point |
getLocation()
|
protected Model |
getModel()
|
ProgressMonitor |
getProgressMonitor()
|
protected Object |
getResource(String name)
|
protected Icon |
getResourceAsIcon(String name)
|
protected Image |
getResourceAsImage(String name)
|
Dimension |
getSize()
|
String |
getTitle()
|
void |
handleEvent(ModelEvent evt)
|
protected abstract void |
init()
Invoked after Controller.showView() . |
boolean |
isEnabled()
|
boolean |
isMaximizable()
|
boolean |
isMinimizable()
|
boolean |
isModal()
|
boolean |
isOpaque()
|
boolean |
isResizable()
|
void |
maximize()
|
void |
minimize()
|
protected void |
onActivate()
Invoked when view is activated. |
protected void |
onClose()
Invoked when view is closed. |
protected void |
onDeactivate()
Invoked when view is de-activated. |
protected void |
onMaximize()
Invoked when view is de-iconified. |
protected void |
onMinimize()
Invoked when view is iconified. |
protected void |
onOpen()
Invoked when view is opened. |
protected void |
onShow()
Invoked when view has been made visible. |
void |
postEvent(Event event)
|
void |
print()
Print the contents of this view. |
void |
propagateEvent(Event event)
|
void |
registerKeyboardAction(Action action)
Provides keyboard bindings for Actions. |
protected abstract void |
reset()
Invoked after onOpen() and before onShow() . |
void |
restore()
|
void |
setBackground(Color color)
|
void |
setBorder(Border border)
|
void |
setCursor(Cursor cursor)
|
void |
setDefaultButton(JButton defaultButton)
|
void |
setEnabled(boolean enabled)
|
void |
setForeground(Color color)
|
void |
setIcon(Icon icon)
|
void |
setLayout(LayoutManager layoutManager)
|
void |
setLocation(int x,
int y)
|
void |
setLocation(Point location)
|
void |
setMaximizable(boolean maximizable)
|
void |
setMinimizable(boolean minimizable)
|
void |
setOpaque(boolean opaque)
|
void |
setPainter(Painter painter)
|
void |
setPosition(View.Position position)
Set view position on screen. |
void |
setProgressMonitor(ProgressMonitor progressMonitor)
|
void |
setResizable(boolean resizable)
|
void |
setSize(Dimension size)
|
void |
setSize(int width,
int height)
|
void |
setTimer(Timer timer)
|
void |
setTitle(String title)
|
String |
translate(String key)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public View()
Default the following settings are used:
Method Detail |
---|
public JPanel getComponent()
public final void close()
Controller.closeView()
public void setLayout(LayoutManager layoutManager)
Container.setLayout(LayoutManager)
public void setBorder(Border border)
JComponent.setBorder(Border)
public void setBackground(Color color)
JComponent.setBackground(Color)
public void setForeground(Color color)
JComponent.setForeground(Color)
public void setPainter(Painter painter)
public boolean isOpaque()
JComponent.isOpaque()
public void setOpaque(boolean opaque)
JComponent.setOpaque(boolean)
public final void setTitle(String title)
Frame.setTitle(String)
public final String getTitle()
Frame.getTitle()
public Dimension getSize()
Component.getSize()
public void setSize(int width, int height)
Component.setSize(int, int)
public void setSize(Dimension size)
Component.setSize(Dimension)
public boolean isResizable()
Frame.isResizable()
public void setResizable(boolean resizable)
Frame.setResizable(boolean)
public final boolean isModal()
Dialog.isModal()
public void center()
View
on parent.
public void center(View.Position position)
View
with given position.
public void focus()
JComponent.requestFocus()
public void restore()
Frame.NORMAL
public boolean isMinimizable()
JInternalFrame.isIconifiable()
public void setMinimizable(boolean minimizable)
JInternalFrame.setIconifiable(boolean)
public void minimize()
Frame.ICONIFIED
public boolean isMaximizable()
JInternalFrame.isMaximizable()
public void setMaximizable(boolean maximizable)
JInternalFrame.setMaximizable(boolean)
public void maximize()
Frame.MAXIMIZED_BOTH
public BufferedImage capture()
Image
(screenshot) of this View
.
public void print()
public JButton getDefaultButton()
JRootPane.getDefaultButton()
public void setDefaultButton(JButton defaultButton)
JRootPane.setDefaultButton(JButton)
public void setIcon(Icon icon)
JFrame.setIconImage(Image)
public Point getLocation()
Component.getLocation()
public void setLocation(int x, int y)
Component.setLocation(int, int)
public void setLocation(Point location)
Component.setLocation(Point)
public void setPosition(View.Position position)
position
- public boolean isEnabled()
Component.isEnabled()
public void setEnabled(boolean enabled)
JComponent.setEnabled(boolean)
public String translate(String key)
JazzUtil.translate(String)
public ProgressMonitor getProgressMonitor()
ProgressMonitor
public void setProgressMonitor(ProgressMonitor progressMonitor)
ProgressMonitor
public Cursor getCursor()
Component.getCursor()
public void setCursor(Cursor cursor)
Component.setCursor(java.awt.Cursor)
public void setTimer(Timer timer)
Timer
protected final Object getResource(String name)
JazzUtil.getResource(String)
protected final Icon getResourceAsIcon(String name)
JazzUtil.getResourceAsIcon(String)
protected final Image getResourceAsImage(String name)
JazzUtil.getResourceAsImage(String)
public final void postEvent(Event event)
public final void propagateEvent(Event event)
protected void onOpen()
protected void onShow()
protected void onClose()
protected void onActivate()
protected void onDeactivate()
protected void onMinimize()
protected void onMaximize()
protected abstract void init()
Controller.showView()
.
protected abstract void reset()
onOpen()
and before onShow()
.
protected void dispose()
protected final Model getModel()
public final void handleEvent(ModelEvent evt)
public void registerKeyboardAction(Action action)
Performs the Action
Event when the accelerator key is pressed.
Action
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |