mhframework.gui
Class MHGUIDialogScreen
java.lang.Object
mhframework.MHScreen
mhframework.gui.MHGUIDialogScreen
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.util.EventListener, MHRenderable
- Direct Known Subclasses:
- MHGUIFileDialogScreen, MHGUIInputDialogScreen
public class MHGUIDialogScreen
- extends MHScreen
Methods inherited from class mhframework.MHScreen |
add, centerText, getComponentList, getFocusedComponent, getNextScreen, getPreviousScreen, hideErrorMessage, isDisposable, isFinished, keyPressed, keyReleased, keyTyped, mouseClicked, mouseMoved, mousePressed, mouseReleased, nextFocusableComponent, prevFocusableComponent, remove, setDisposable, setFinished, setNextScreen, setPreviousScreen, showErrorMessage, tileImage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OK_OPTION
public static final int OK_OPTION
- See Also:
- Constant Field Values
CANCEL_OPTION
public static final int CANCEL_OPTION
- See Also:
- Constant Field Values
_btnOK
protected MHGUIButton _btnOK
_btnCancel
protected MHGUIButton _btnCancel
_titleFont
protected java.awt.Font _titleFont
_messageFont
protected java.awt.Font _messageFont
MHGUIDialogScreen
public MHGUIDialogScreen()
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
load
public void load()
- Description copied from class:
MHScreen
- Set up a screen and prepare it to run. This method is called
before every time this screen is displayed.
- Specified by:
load
in class MHScreen
unload
public void unload()
- Description copied from class:
MHScreen
- Perform termination housekeeping or reset the screen
variables when a screen has finished executing.
- Specified by:
unload
in class MHScreen
advance
public void advance()
- Description copied from interface:
MHRenderable
- Tells an object to update its data.
- Specified by:
advance
in interface MHRenderable
- Overrides:
advance
in class MHScreen
render
public void render(java.awt.Graphics2D g2d)
- Description copied from class:
MHScreen
- Draws the GUI components onto the sent Graphics object.
This method is intended to be overridden by methods that
do their own specialized rendering, then call this base-class
version to draw the components.
- Specified by:
render
in interface MHRenderable
- Overrides:
render
in class MHScreen
- Parameters:
g2d
- The Graphics object on which this object is to draw itself.
drawBackground
public void drawBackground(java.awt.Graphics2D g2d)
drawTitle
public void drawTitle(java.awt.Graphics2D g2d,
int x,
int y)
drawMessage
public void drawMessage(java.awt.Graphics2D g2d,
int x,
int y)
getTitle
public java.lang.String getTitle()
- Returns:
- the _strTitle
setTitle
public void setTitle(java.lang.String title)
- Parameters:
title
- the _strTitle to set
getMessage
public java.lang.String getMessage()
- Returns:
- the _strMessage
setMessage
public void setMessage(java.lang.String message)
- Parameters:
message
- the _strMessage to set
getBackgroundImage
public java.awt.Image getBackgroundImage()
- Returns:
- the _backgroundImage
setBackgroundImage
public void setBackgroundImage(java.awt.Image image)
- Parameters:
image
- the _backgroundImage to set
setTitleFont
public void setTitleFont(java.awt.Font font)
- Parameters:
font
- the _titleFont to set
setMessageFont
public void setMessageFont(java.awt.Font font)
- Parameters:
font
- the _messageFont to set
setOKButton
public void setOKButton(MHGUIButton ok)
- Parameters:
_btnok
- the _btnOK to set
setCancelButton
public void setCancelButton(MHGUIButton cancel)
- Parameters:
cancel
- the _btnCancel to set
setButtonCaptions
public void setButtonCaptions(java.lang.String okCaption,
java.lang.String cancelCaption)
getReturnCode
public int getReturnCode()
- Returns:
- the returnCode
getTitleColor
public java.awt.Color getTitleColor()
setTitleColor
public void setTitleColor(java.awt.Color titleColor)
getTextColor
public java.awt.Color getTextColor()
setTextColor
public void setTextColor(java.awt.Color textColor)
getBackgroundColor
public java.awt.Color getBackgroundColor()
setBackgroundColor
public void setBackgroundColor(java.awt.Color bgColor)