public abstract class TimeModelBaseExecutionElements
extends java.lang.Object
implements java.awt.event.ActionListener
TimeModel
Modifier and Type | Field and Description |
---|---|
protected javax.swing.JToolBar |
jToolBar4Elements
This is the JToolBar to which your elements can be added !
|
protected int |
view |
protected static int |
ViewCOUNTDOWN |
protected static int |
ViewTIMER |
Constructor and Description |
---|
TimeModelBaseExecutionElements()
Instantiates a new time model base execution elements.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent ae) |
void |
addToolbarElements()
Adds the custom toolbar elements.
|
void |
addToolbarElements(javax.swing.JToolBar jToolBar2AddElements)
Adds the custom toolbar elements.
|
protected java.lang.String |
getIntroductionHeader()
Returns the introduction header of the tools.
|
protected javax.swing.JButton |
getJButtonTimeConfig()
Gets the button for the time configuration.
|
protected javax.swing.JLabel |
getJLabelIntro()
Returns the JLabel for the introduction of the TimeModel's display.
|
protected javax.swing.JLabel |
getJLabelTimeDisplay()
Returns the time display.
|
protected javax.swing.JMenuItem |
getJMenuItemViewCountdown()
Gets the j menu item view Countdown.
|
protected javax.swing.JMenuItem |
getJMenuItemViewTimer()
Gets the j menu item view timer.
|
protected javax.swing.JPopupMenu |
getJPopupMenuViewConfiguration()
Gets the j popup menu view configuration.
|
protected javax.swing.JToolBar.Separator |
getSeparator(int numberOfSeperator)
Returns a reminded separator, so that separators can be removed later on.
|
protected java.lang.String |
getTimeDurationFormatted(long duration,
java.lang.String timeFormat)
Returns a time duration formatted.
|
protected java.lang.String |
getTimeFormatted(long time,
java.lang.String timeFormat)
Returns a time formatted.
|
abstract TimeModel |
getTimeModel()
Returns the TimeModel.
|
abstract java.lang.String |
getToolBarTitle()
Returns the tool bar title as for example 'Time' or 'Counter'.
|
protected void |
removeAllSeparator()
Removes all separator.
|
void |
removeToolbarElements()
Removes the custom toolbar elements.
|
protected void |
setIntroductionHeader(java.lang.String newIntroHeader)
Sets the introduction header for the tools.
|
abstract void |
setTimeModel(TimeModel timeModel)
Sets the TimeModel.
|
protected static final int ViewTIMER
protected static final int ViewCOUNTDOWN
protected int view
protected javax.swing.JToolBar jToolBar4Elements
public TimeModelBaseExecutionElements()
public abstract void setTimeModel(TimeModel timeModel)
timeModel
- the new TimeModelpublic abstract TimeModel getTimeModel()
public abstract java.lang.String getToolBarTitle()
protected void setIntroductionHeader(java.lang.String newIntroHeader)
newIntroHeader
- the new introduction header for the GUI representationprotected java.lang.String getIntroductionHeader()
public void addToolbarElements(javax.swing.JToolBar jToolBar2AddElements)
jToolBar2AddElements
- public void addToolbarElements()
public void removeToolbarElements()
protected javax.swing.JToolBar.Separator getSeparator(int numberOfSeperator)
numberOfSeperator
- the number of separatorprotected void removeAllSeparator()
protected java.lang.String getTimeFormatted(long time, java.lang.String timeFormat)
time
- the timetimeFormat
- the time formatprotected java.lang.String getTimeDurationFormatted(long duration, java.lang.String timeFormat)
duration
- the time differencetimeFormat
- the time formatprotected javax.swing.JLabel getJLabelIntro()
protected javax.swing.JLabel getJLabelTimeDisplay()
protected javax.swing.JButton getJButtonTimeConfig()
protected javax.swing.JPopupMenu getJPopupMenuViewConfiguration()
protected javax.swing.JMenuItem getJMenuItemViewTimer()
protected javax.swing.JMenuItem getJMenuItemViewCountdown()
public void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed
in interface java.awt.event.ActionListener