org.crosswire.bibledesktop.desktop
Class DesktopActions

java.lang.Object
  extended by org.crosswire.bibledesktop.desktop.DesktopActions
All Implemented Interfaces:
Actionable

public class DesktopActions
extends Object
implements Actionable

DesktopAction is nothing more than a holder of the behavior of the Desktop. It could easily be member methods in that class. It is here simply to simplify the Desktop class and minimize maintenance cost. Previously each of the "do" methods was a separate class.

Author:
Joe Walker [joe at eireneh dot com], DM Smith [dmsmith555 at yahoo dot com]
See Also:
for license details. The copyright to this program is held by it's authors.

Nested Class Summary
private static class DesktopActions.ShowSideBarVisitor
           
 
Field Summary
(package private) static String ABOUT
           
private  ActionFactory actions
          The factory for actions that this class works with
private  AboutPane atp
          The About window
(package private) static String BACK
           
(package private) static String BOOKS
           
(package private) static String COMPARE_TOGGLE
           
(package private) static String CONTENTS
           
(package private) static String COPY
           
protected  Desktop desktop
          The desktop on which these actions work
(package private) static String EDIT
           
(package private) static String EXIT
           
(package private) static String FILE
           
(package private) static String FORWARD
           
(package private) static String GO
           
(package private) static String HELP
           
(package private) static String JOURNAL_TOGGLE
           
protected static Logger log
          The log stream
(package private) static String OPEN
           
(package private) static String OPTIONS
           
private  boolean osxRegistered
          Indicates whether there is MacOSX integration.
(package private) static String SAVE
           
(package private) static String SAVE_ALL
           
(package private) static String SAVE_AS
           
(package private) static String SIDEBAR_TOGGLE
           
private  SitesPane sites
          The Book installer window
(package private) static String STATUS_TOGGLE
           
(package private) static String TOOLS
           
(package private) static String TOOLTIP_TOGGLE
           
(package private) static String VERSE
           
(package private) static String VIEW
           
(package private) static String VIEW_SOURCE
           
 
Constructor Summary
DesktopActions(Desktop desktop)
          Create the actions for the desktop
 
Method Summary
 void actionPerformed(String action)
           
 void doAbout()
          For opening the About window
 void doBack()
          Go to previous passage.
 void doBCVNum()
           
 void doBooks()
          Opens the Book installer window (aka a SitesPane)
 void doCompareToggle(ActionEvent ev)
          Show differences between Bible Book versions.
 void doContents()
          For opening a help file.
 void doCopy()
          Copy the selected text from the "active" display area to the clipboard.
 void doCVNum()
           
 void doExit()
          Exits the VM.
 void doForward()
          Go to next passage.
 void doHeadings(ActionEvent ev)
           
 void doJournalToggle(ActionEvent ev)
          Show web journal or not.
 void doMorph(ActionEvent ev)
           
 void doNotes(ActionEvent ev)
           
 void doNoVNum()
           
 void doOpen()
          Open a new passage window from a file.
 void doOptions()
          Opens the Options window
 void doSave()
          Save the current passage window.
 void doSaveAll()
          Save all the passage windows.
 void doSaveAs()
          Save the current passage window under a new name.
 void doSidebarToggle(ActionEvent ev)
          Show large or small tool bar icons.
 void doStatusToggle(ActionEvent ev)
          Show large or small tool bar icons.
 void doStrongs(ActionEvent ev)
           
 void doTinyVNum(ActionEvent ev)
           
 void doToolTipToggle(ActionEvent ev)
          Show large or small tool bar icons.
 void doViewSource()
          View the HTML as interpreted by the current window.
 void doVLine(ActionEvent ev)
           
 void doVNum()
           
 void doXRef(ActionEvent ev)
           
 Action getAction(String key)
          Get a particular action by internal name
 Desktop getDesktop()
           
 SitesPane getSites()
           
 boolean isOSXRegistered()
          Determines whether MacOSX has been registered.
 boolean macOSXRegistration()
          Register the application with Apple EAWT, which provides support for the Application Menu, with About, Preferences (Options) and Quit (Exit).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE

static final String FILE
See Also:
Constant Field Values

EDIT

static final String EDIT
See Also:
Constant Field Values

GO

static final String GO
See Also:
Constant Field Values

VIEW

static final String VIEW
See Also:
Constant Field Values

TOOLS

static final String TOOLS
See Also:
Constant Field Values

HELP

static final String HELP
See Also:
Constant Field Values

OPEN

static final String OPEN
See Also:
Constant Field Values

SAVE

static final String SAVE
See Also:
Constant Field Values

SAVE_AS

static final String SAVE_AS
See Also:
Constant Field Values

SAVE_ALL

static final String SAVE_ALL
See Also:
Constant Field Values

EXIT

static final String EXIT
See Also:
Constant Field Values

COPY

static final String COPY
See Also:
Constant Field Values

BACK

static final String BACK
See Also:
Constant Field Values

FORWARD

static final String FORWARD
See Also:
Constant Field Values

COMPARE_TOGGLE

static final String COMPARE_TOGGLE
See Also:
Constant Field Values

TOOLTIP_TOGGLE

static final String TOOLTIP_TOGGLE
See Also:
Constant Field Values

STATUS_TOGGLE

static final String STATUS_TOGGLE
See Also:
Constant Field Values

SIDEBAR_TOGGLE

static final String SIDEBAR_TOGGLE
See Also:
Constant Field Values

JOURNAL_TOGGLE

static final String JOURNAL_TOGGLE
See Also:
Constant Field Values

VERSE

static final String VERSE
See Also:
Constant Field Values

VIEW_SOURCE

static final String VIEW_SOURCE
See Also:
Constant Field Values

BOOKS

static final String BOOKS
See Also:
Constant Field Values

OPTIONS

static final String OPTIONS
See Also:
Constant Field Values

CONTENTS

static final String CONTENTS
See Also:
Constant Field Values

ABOUT

static final String ABOUT
See Also:
Constant Field Values

desktop

protected Desktop desktop
The desktop on which these actions work


actions

private ActionFactory actions
The factory for actions that this class works with


osxRegistered

private boolean osxRegistered
Indicates whether there is MacOSX integration.


atp

private AboutPane atp
The About window


sites

private SitesPane sites
The Book installer window


log

protected static final Logger log
The log stream

Constructor Detail

DesktopActions

public DesktopActions(Desktop desktop)
Create the actions for the desktop

Parameters:
desktop - the desktop for which these actions apply
Method Detail

getAction

public Action getAction(String key)
Get a particular action by internal name

Parameters:
key - the internal name for the action
Returns:
the action requested or null if it does not exist

actionPerformed

public void actionPerformed(String action)
Specified by:
actionPerformed in interface Actionable

getDesktop

public Desktop getDesktop()
Returns:
the desktop to which these actions apply

isOSXRegistered

public boolean isOSXRegistered()
Determines whether MacOSX has been registered.

Returns:
true when there is full MacOSX integration.

getSites

public SitesPane getSites()
Returns:
the Bible installer dialog

doOpen

public void doOpen()
Open a new passage window from a file.


doSave

public void doSave()
Save the current passage window.


doSaveAs

public void doSaveAs()
Save the current passage window under a new name.


doSaveAll

public void doSaveAll()
Save all the passage windows.


doExit

public void doExit()
Exits the VM.


doCopy

public void doCopy()
Copy the selected text from the "active" display area to the clipboard.


doBack

public void doBack()
Go to previous passage.


doForward

public void doForward()
Go to next passage.


doStrongs

public void doStrongs(ActionEvent ev)

doMorph

public void doMorph(ActionEvent ev)

doVLine

public void doVLine(ActionEvent ev)

doVNum

public void doVNum()

doTinyVNum

public void doTinyVNum(ActionEvent ev)

doBCVNum

public void doBCVNum()

doCVNum

public void doCVNum()

doNoVNum

public void doNoVNum()

doCompareToggle

public void doCompareToggle(ActionEvent ev)
Show differences between Bible Book versions.


doHeadings

public void doHeadings(ActionEvent ev)

doNotes

public void doNotes(ActionEvent ev)

doXRef

public void doXRef(ActionEvent ev)

doViewSource

public void doViewSource()
View the HTML as interpreted by the current window. This HTML will not return the styling present in the viewer. That is all class="" are stripped out. Also you may find additional whitespace added to the original.


doBooks

public void doBooks()
Opens the Book installer window (aka a SitesPane)


doOptions

public void doOptions()
Opens the Options window


doContents

public void doContents()
For opening a help file.


doAbout

public void doAbout()
For opening the About window


doToolTipToggle

public void doToolTipToggle(ActionEvent ev)
Show large or small tool bar icons.


doStatusToggle

public void doStatusToggle(ActionEvent ev)
Show large or small tool bar icons.


doSidebarToggle

public void doSidebarToggle(ActionEvent ev)
Show large or small tool bar icons.


doJournalToggle

public void doJournalToggle(ActionEvent ev)
Show web journal or not.


macOSXRegistration

public boolean macOSXRegistration()
Register the application with Apple EAWT, which provides support for the Application Menu, with About, Preferences (Options) and Quit (Exit).

Returns:
true on success

Copyright ยจ 2003-2007