fi.helsinki.dacopan.ui
Class UserInterface

java.lang.Object
  extended by fi.helsinki.dacopan.ui.UserInterface

public class UserInterface
extends java.lang.Object

This class handles the user interface part of the Main Frame so that the main frame itself can concentrate in controlling the flow of the program.


Field Summary
static java.awt.Color DACOPAN_COLOR_ACTIVE_CAPTION_BG
           
static java.awt.Color DACOPAN_COLOR_ACTIVE_CAPTION_TEXT
           
static java.awt.Color DACOPAN_COLOR_DKHIGHLIGHT
           
static java.awt.Color DACOPAN_COLOR_HIGHLIGHT
           
static java.awt.Color DACOPAN_COLOR_INACTIVE_CAPTION_BG
           
static java.awt.Color DACOPAN_COLOR_INACTIVE_CAPTION_TEXT
           
static java.awt.Color DACOPAN_COLOR_LTHIGHLIGHT
           
static java.awt.Color DACOPAN_COLOR_MAIN_PANE_BG
           
static java.awt.Color DACOPAN_COLOR_PANE_BG
           
static java.awt.Color DACOPAN_COLOR_PANE_TEXT
           
static java.awt.Color DACOPAN_COLOR_WINDOW
           
static int DACOPAN_DIVIDER_SIZE
          The size for the splitpane divider in pixels
static java.awt.Font DACOPAN_FONT_BUTTON
          The font to be used in the buttons
static java.awt.Font DACOPAN_FONT_MENU
          The font for the menu
static java.awt.Font DACOPAN_FONT_TITLE
          The title font used in all animation panels
static int DEFAULT_DISP_MODE_HEIGHT
          The default height of the main window
static int DEFAULT_DISP_MODE_WIDTH
          The default width of the main window
static float DEFAULT_RATIO_MAIN_2_RIGHT
          The default ratio of the main panel to the right panel
static float DEFAULT_RATIO_UFO_2_NOTE
          The default ratio of UFO to NotePanel
static int HELP_DIALOG_HEIGHT
          Height of the help window
static int HELP_DIALOG_WIDTH
          Width of the help window
 
Constructor Summary
UserInterface(MainFrame frame)
          Creates the UI for the animator.
 
Method Summary
protected  void changeSettings()
          Creates and dispaly the dialog with the general and MSC settings
protected  void changeSettingsMode(int mode)
          Creates and displays the settings dialog with given mode selected.
protected  void recreateUI()
          Re-creates the user interface for example when the language has been changed
 void refresh()
          Refreshes the UI to reflect any changes in the MainFrame that affect the visual look and feel of the software
 void setAnimatorModeInfo(int mode)
          Sets the animator mode information in the user interface.
 void setControlsEnabledAnimationControl(boolean value)
          Sets the enabled value for all controls related to controlling the control signal framework.
 void setControlsEnabledAnimatorMode(boolean value)
          Sets the enabled value for the animator mode selection
 void setControlsEnabledFastForward(boolean value)
          Sets the enabled value for fast forward controls
 void setControlsEnabledLayerSelection(boolean value)
          Sets the enabled value for the layer selection controls
 void setControlsEnabledMSC(boolean value)
           
 void setControlsEnabledPause(boolean value)
          Sets the enabled value for the pause control
 void setControlsEnabledPlay(boolean value)
          Sets the enabled value for the play control
 void setControlsEnabledPlayAndPause(boolean value)
          Sets the enabled value for the play button, also sets the pause button to the complement of value
 void setControlsEnabledRewind(boolean value)
          Sets the enabled value for rewind controls
 void setControlsEnabledSave(boolean value)
          Sets the enabled value for saving controls
 void setControlsEnabledSaveAs(boolean value)
          Sets the enabled value for saving as controls
 void setControlsEnabledSettings(boolean value)
          Sets the enabled value for the settings button
 void setControlsEnabledStepBack(boolean value)
          Sets the enabled value for the stepping backward
 void setControlsEnabledStepForward(boolean value)
          Sets the enabled value for stepping forward
 void setControlsEnabledTSC(boolean value)
           
static void setDefaultButtonFont(java.awt.Component component)
          This method can be used to set the default button font to the given button
 void setMainPanel(javax.swing.JComponent panel)
          Sets the given JComponent to the main panel space in the UI.
 void setNotePanel(javax.swing.JComponent panel)
          Sets the given JComponent to the Note Panel space in the UI.
 void setTimePanel(AbstractAnimationPanel panel)
          Sets the given AbstractAnimationPanel to the Time Panel space in the UI.
 void setUfoPanel(javax.swing.JComponent ufoPanel)
          Sets the given JComponent to the UFO Panel space in the UI.
protected  void showHelp(int mode)
          Opens the HTML help in the current locale in a new window.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DACOPAN_FONT_TITLE

public static final java.awt.Font DACOPAN_FONT_TITLE
The title font used in all animation panels


DACOPAN_FONT_BUTTON

public static final java.awt.Font DACOPAN_FONT_BUTTON
The font to be used in the buttons


DACOPAN_FONT_MENU

public static final java.awt.Font DACOPAN_FONT_MENU
The font for the menu


DACOPAN_DIVIDER_SIZE

public static final int DACOPAN_DIVIDER_SIZE
The size for the splitpane divider in pixels

See Also:
Constant Field Values

DEFAULT_DISP_MODE_WIDTH

public static final int DEFAULT_DISP_MODE_WIDTH
The default width of the main window

See Also:
Constant Field Values

DEFAULT_DISP_MODE_HEIGHT

public static final int DEFAULT_DISP_MODE_HEIGHT
The default height of the main window

See Also:
Constant Field Values

DEFAULT_RATIO_UFO_2_NOTE

public static final float DEFAULT_RATIO_UFO_2_NOTE
The default ratio of UFO to NotePanel

See Also:
Constant Field Values

DEFAULT_RATIO_MAIN_2_RIGHT

public static final float DEFAULT_RATIO_MAIN_2_RIGHT
The default ratio of the main panel to the right panel

See Also:
Constant Field Values

HELP_DIALOG_WIDTH

public static final int HELP_DIALOG_WIDTH
Width of the help window

See Also:
Constant Field Values

HELP_DIALOG_HEIGHT

public static final int HELP_DIALOG_HEIGHT
Height of the help window

See Also:
Constant Field Values

DACOPAN_COLOR_ACTIVE_CAPTION_TEXT

public static final java.awt.Color DACOPAN_COLOR_ACTIVE_CAPTION_TEXT

DACOPAN_COLOR_INACTIVE_CAPTION_TEXT

public static final java.awt.Color DACOPAN_COLOR_INACTIVE_CAPTION_TEXT

DACOPAN_COLOR_ACTIVE_CAPTION_BG

public static final java.awt.Color DACOPAN_COLOR_ACTIVE_CAPTION_BG

DACOPAN_COLOR_INACTIVE_CAPTION_BG

public static final java.awt.Color DACOPAN_COLOR_INACTIVE_CAPTION_BG

DACOPAN_COLOR_HIGHLIGHT

public static final java.awt.Color DACOPAN_COLOR_HIGHLIGHT

DACOPAN_COLOR_LTHIGHLIGHT

public static final java.awt.Color DACOPAN_COLOR_LTHIGHLIGHT

DACOPAN_COLOR_DKHIGHLIGHT

public static final java.awt.Color DACOPAN_COLOR_DKHIGHLIGHT

DACOPAN_COLOR_MAIN_PANE_BG

public static final java.awt.Color DACOPAN_COLOR_MAIN_PANE_BG

DACOPAN_COLOR_PANE_BG

public static final java.awt.Color DACOPAN_COLOR_PANE_BG

DACOPAN_COLOR_PANE_TEXT

public static final java.awt.Color DACOPAN_COLOR_PANE_TEXT

DACOPAN_COLOR_WINDOW

public static final java.awt.Color DACOPAN_COLOR_WINDOW
Constructor Detail

UserInterface

public UserInterface(MainFrame frame)
Creates the UI for the animator.

Parameters:
frame - A reference to the MainFrame
Method Detail

showHelp

protected void showHelp(int mode)
Opens the HTML help in the current locale in a new window.


changeSettings

protected void changeSettings()
Creates and dispaly the dialog with the general and MSC settings


changeSettingsMode

protected void changeSettingsMode(int mode)
Creates and displays the settings dialog with given mode selected.

Parameters:
mode -

setUfoPanel

public void setUfoPanel(javax.swing.JComponent ufoPanel)
Sets the given JComponent to the UFO Panel space in the UI.

Parameters:
ufoPanel -

setNotePanel

public void setNotePanel(javax.swing.JComponent panel)
Sets the given JComponent to the Note Panel space in the UI.

Parameters:
ufoPanel -

setMainPanel

public void setMainPanel(javax.swing.JComponent panel)
Sets the given JComponent to the main panel space in the UI.

Parameters:
ufoPanel -

setTimePanel

public void setTimePanel(AbstractAnimationPanel panel)
Sets the given AbstractAnimationPanel to the Time Panel space in the UI.

Parameters:
ufoPanel -

setAnimatorModeInfo

public void setAnimatorModeInfo(int mode)
Sets the animator mode information in the user interface. This should only be called through MainFrame.setAnimatorMode and refreshSelections.

Parameters:
mode - The mode to which the animator is changed

setControlsEnabledAnimatorMode

public void setControlsEnabledAnimatorMode(boolean value)
Sets the enabled value for the animator mode selection


setControlsEnabledSettings

public void setControlsEnabledSettings(boolean value)
Sets the enabled value for the settings button


setControlsEnabledPlayAndPause

public void setControlsEnabledPlayAndPause(boolean value)
Sets the enabled value for the play button, also sets the pause button to the complement of value


setControlsEnabledPlay

public void setControlsEnabledPlay(boolean value)
Sets the enabled value for the play control


setControlsEnabledPause

public void setControlsEnabledPause(boolean value)
Sets the enabled value for the pause control


setControlsEnabledLayerSelection

public void setControlsEnabledLayerSelection(boolean value)
Sets the enabled value for the layer selection controls


setControlsEnabledStepBack

public void setControlsEnabledStepBack(boolean value)
Sets the enabled value for the stepping backward


setControlsEnabledStepForward

public void setControlsEnabledStepForward(boolean value)
Sets the enabled value for stepping forward


setControlsEnabledRewind

public void setControlsEnabledRewind(boolean value)
Sets the enabled value for rewind controls


setControlsEnabledFastForward

public void setControlsEnabledFastForward(boolean value)
Sets the enabled value for fast forward controls


setControlsEnabledSave

public void setControlsEnabledSave(boolean value)
Sets the enabled value for saving controls


setControlsEnabledSaveAs

public void setControlsEnabledSaveAs(boolean value)
Sets the enabled value for saving as controls


setControlsEnabledMSC

public void setControlsEnabledMSC(boolean value)

setControlsEnabledTSC

public void setControlsEnabledTSC(boolean value)

setControlsEnabledAnimationControl

public void setControlsEnabledAnimationControl(boolean value)
Sets the enabled value for all controls related to controlling the control signal framework. Used when switching to enc and back


refresh

public void refresh()
Refreshes the UI to reflect any changes in the MainFrame that affect the visual look and feel of the software


recreateUI

protected void recreateUI()
Re-creates the user interface for example when the language has been changed


setDefaultButtonFont

public static void setDefaultButtonFont(java.awt.Component component)
This method can be used to set the default button font to the given button



© Dacopan2 team, 2005-