com.lightdev.app.allday
Class AllDay


java.lang.Object

  extended by com.lightdev.app.Application

      extended by com.lightdev.app.MenuApplication

          extended by com.lightdev.app.DefaultApplication

              extended by com.lightdev.app.allday.AllDay

All Implemented Interfaces:
MouseListener, EventListener

public class AllDay
extends DefaultApplication
implements MouseListener

Main class of application AllDay.

Licensing this material as open source does not necessarily mean to give it away for nothing. I always like to hear about your comments and even without comments a short e-mail about you using this software makes my day and lets me continue to work on open source projects (I certainly promise to respect your privacy).

Thank you!

Version:
9, March 10, 2005
Author:
Ulrich Hilger, Light Development, http://www.lightdev.com, info@lightdev.com, Redistribution and use are subject to terms and conditions of the Light Development Basic License agreement as layed out in file 'license.txt' accompanying this package.
See Also:
Application

Field Summary
static String ACTION_ABOUT_APP
           
static String ACTION_EDIT_EVENT
           
static String ACTION_EDIT_PREFS
           
static String ACTION_EXIT_APP
           
static String ACTION_HELP_CONTENTS
           
static String ACTION_NEW_EVENT
           
static String ACTION_NEW_EVENTS_FILE
           
static String ACTION_NEXT_YEAR
           
static String ACTION_OPEN_EVENTS
           
static String ACTION_PREV_YEAR
           
static String ACTION_REMOVE_EVENT
           
static String ACTION_SAVE_EVENTS
           
static String ACTION_SAVE_EVENTS_AS
           
static String ACTION_SET_YEAR
           
static String ACTION_THIS_YEAR
           
static String APP_NAME
          the name of this application
static int DIALOG_RESULT_CANCEL
           
static int DIALOG_RESULT_OK
           
static String EVENTS_FILE_EXT
           
static String LOG_APP_STARTED
          constant holding the resource bundle key of the log message notifying start of this application
static String LOG_APP_TERMINATED
          constant holding the resource bundle key of the log message notifying start of this application
static String RB_KEY_CANCEL_BUTTON_NAME
           
static String RB_KEY_EVENTS_FILE_DESC
           
static String RB_KEY_HELP_BUTTON_NAME
           
static String RB_KEY_OK_BUTTON_NAME
           
 
Fields inherited from class com.lightdev.app.DefaultApplication
ACTION_SHOW_HELP_CONTENTS
 
Fields inherited from class com.lightdev.app.MenuApplication
menuSeparatorKey, RB_KEY_APP_MENUBAR
 
Fields inherited from class com.lightdev.app.Application
actionSuffix, APP_HELP_NAME, imageSuffix, JAVA_HELP_EXT, labelSuffix, logger, RB_KEY_ABOUT_APP_DIALOG_TITLE, RB_KEY_LOG_APP_CAN_NOT_EXIT, RB_KEY_LOG_APP_STARTED, RB_KEY_LOG_APP_TERMINATED, RESOURCE_NOT_FOUND, resources, selectedIconSuffix, toolTipSuffix, URL_SEPARATOR
 
Constructor Summary
AllDay()
          constructor
 
Method Summary
 void changeYear(int changeValue)
          change the year that is currently displayed
 void editSelectedEvent(boolean remove)
          find the currently selected event and initiate an edit proces for it
protected  String getAppName()
          get the name of this application
 DayPanel getDayPanel()
           
 EventListPanel getEventListPanel()
           
 YearPanel getYearPanel()
          get the year panel of this instance of MainFrame
protected  void initActions()
          initialize the command table of the resource menu with this application's actions
static void main(String[] args)
          Main method
 void mouseClicked(MouseEvent e)
           
 void mouseEntered(MouseEvent e)
           
 void mouseExited(MouseEvent e)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
 void setEventFile(File eventFile)
          set the file that has the events to be displayed by AllDay
 void setYear(int newYear)
          set the year this instance of AllDay should display
 void setYearPanel(YearPanel panel)
          Set this MainFrame to show a given YearPanel
 
Methods inherited from class com.lightdev.app.DefaultApplication
findMainFrame, initMainFrame
 
Methods inherited from class com.lightdev.app.MenuApplication
createMenu, createMenubar, createMenuItem, createToolBar, getMenuItem
 
Methods inherited from class com.lightdev.app.Application
about, addAction, canExit, exitApplication, getAction, getBundle, getHelpBroker, getIconForCommand, getIconForName, getResource, getResourceString, log, logStackTrace, setLogging, setLogLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APP_NAME


public static final String APP_NAME
the name of this application

See Also:
Constant Field Values

ACTION_EXIT_APP


public static final String ACTION_EXIT_APP
See Also:
Constant Field Values

ACTION_HELP_CONTENTS


public static final String ACTION_HELP_CONTENTS
See Also:
Constant Field Values

ACTION_ABOUT_APP


public static final String ACTION_ABOUT_APP
See Also:
Constant Field Values

ACTION_SET_YEAR


public static final String ACTION_SET_YEAR
See Also:
Constant Field Values

ACTION_PREV_YEAR


public static final String ACTION_PREV_YEAR
See Also:
Constant Field Values

ACTION_NEXT_YEAR


public static final String ACTION_NEXT_YEAR
See Also:
Constant Field Values

ACTION_EDIT_PREFS


public static final String ACTION_EDIT_PREFS
See Also:
Constant Field Values

ACTION_THIS_YEAR


public static final String ACTION_THIS_YEAR
See Also:
Constant Field Values

ACTION_NEW_EVENT


public static final String ACTION_NEW_EVENT
See Also:
Constant Field Values

ACTION_OPEN_EVENTS


public static final String ACTION_OPEN_EVENTS
See Also:
Constant Field Values

ACTION_SAVE_EVENTS


public static final String ACTION_SAVE_EVENTS
See Also:
Constant Field Values

ACTION_SAVE_EVENTS_AS


public static final String ACTION_SAVE_EVENTS_AS
See Also:
Constant Field Values

ACTION_NEW_EVENTS_FILE


public static final String ACTION_NEW_EVENTS_FILE
See Also:
Constant Field Values

ACTION_EDIT_EVENT


public static final String ACTION_EDIT_EVENT
See Also:
Constant Field Values

ACTION_REMOVE_EVENT


public static final String ACTION_REMOVE_EVENT
See Also:
Constant Field Values

RB_KEY_OK_BUTTON_NAME


public static final String RB_KEY_OK_BUTTON_NAME
See Also:
Constant Field Values

RB_KEY_CANCEL_BUTTON_NAME


public static final String RB_KEY_CANCEL_BUTTON_NAME
See Also:
Constant Field Values

RB_KEY_HELP_BUTTON_NAME


public static final String RB_KEY_HELP_BUTTON_NAME
See Also:
Constant Field Values

RB_KEY_EVENTS_FILE_DESC


public static final String RB_KEY_EVENTS_FILE_DESC
See Also:
Constant Field Values

EVENTS_FILE_EXT


public static final String EVENTS_FILE_EXT
See Also:
Constant Field Values

DIALOG_RESULT_OK


public static final int DIALOG_RESULT_OK
See Also:
Constant Field Values

DIALOG_RESULT_CANCEL


public static final int DIALOG_RESULT_CANCEL
See Also:
Constant Field Values

LOG_APP_STARTED


public static final String LOG_APP_STARTED
constant holding the resource bundle key of the log message notifying start of this application

See Also:
Constant Field Values

LOG_APP_TERMINATED


public static final String LOG_APP_TERMINATED
constant holding the resource bundle key of the log message notifying start of this application

See Also:
Constant Field Values
Constructor Detail

AllDay


public AllDay()
constructor

See Also:
Application
Method Detail

main


public static void main(String[] args)
Main method


getYearPanel


public YearPanel getYearPanel()
get the year panel of this instance of MainFrame

Returns:
the year panel

getEventListPanel


public EventListPanel getEventListPanel()

getDayPanel


public DayPanel getDayPanel()

setYearPanel


public void setYearPanel(YearPanel panel)
Set this MainFrame to show a given YearPanel

Parameters:
panel - the YearPanel to show in this MainFrame

getAppName


protected String getAppName()
get the name of this application

Overrides:
getAppName in class Application
Returns:
the name of this application

initActions


protected void initActions()
initialize the command table of the resource menu with this application's actions

Overrides:
initActions in class DefaultApplication

setEventFile


public void setEventFile(File eventFile)
set the file that has the events to be displayed by AllDay

Parameters:
eventFile - File the file to get events from, or null if a new empty event model should be created

setYear


public void setYear(int newYear)
set the year this instance of AllDay should display

Parameters:
newYear - int the new year to display

changeYear


public void changeYear(int changeValue)
change the year that is currently displayed

Parameters:
changeValue - int the value that should be taken to change the year, e.g. -1 = one year less, 1 one year more

editSelectedEvent


public void editSelectedEvent(boolean remove)
find the currently selected event and initiate an edit proces for it

Parameters:
remove - boolean true when the selected event should be removed

mouseClicked


public void mouseClicked(MouseEvent e)
Specified by:
mouseClicked in interface MouseListener

mouseEntered


public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener

mouseExited


public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener

mousePressed


public void mousePressed(MouseEvent e)
Specified by:
mousePressed in interface MouseListener

mouseReleased


public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener

Copyright (c) 1989 - 2005 Ulrich Hilger