|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
org.crosswire.bibledesktop.desktop.Desktop
public class Desktop
The Desktop is the user's view of BibleDesktop.
for license details.
The copyright to this program is held by it's authors.
,
Serialized FormNested Class Summary | |
---|---|
private static class |
Desktop.DesktopRunner
Helper class to actually display the application at the right time. |
private static class |
Desktop.DesktopThread
Helper class to run the application in a thread group and capture errors. |
Nested classes/interfaces inherited from class javax.swing.JFrame |
---|
JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
---|
Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
---|
Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected ActionFactory |
actions
The factory for actions that this class works with |
private StatusBar |
barStatus
|
static String |
BIBLE_PROTOCOL
|
private PropertyChangeSupport |
changeSupport
|
static String |
COMMENTARY_PROTOCOL
|
private boolean |
compareShowing
Whether to show differences between versions of the Bible |
private org.crosswire.common.config.Config |
config
The configuration engine |
private static String |
CONFIG_KEY
|
private static String |
CONV_KEY
|
private JPanel |
corePanel
|
private static String |
CSWING_KEY
|
private static String |
DESKTOP_KEY
|
protected DesktopActions |
desktopActions
The DesktopActions is the holder for the actions, merely to keep the size of this file smaller. |
static String |
DICTIONARY_PROTOCOL
|
private static String |
EMPTY_STRING
|
static String |
GREEK_DEF_PROTOCOL
|
static String |
GREEK_MORPH_PROTOCOL
|
private boolean |
hasRefBooks
|
static String |
HEBREW_DEF_PROTOCOL
|
static String |
HEBREW_MORPH_PROTOCOL
|
private org.crosswire.common.history.History |
history
|
private static ImageIcon |
ICON_APP
The application icon |
protected static org.slf4j.Logger |
log
The log stream |
private JPanel |
mainPanel
|
private static org.crosswire.common.util.CWProject |
PROJECT
|
protected MultiBookPane |
reference
|
private static boolean |
reuseBibleView
Whether to current BibleView should be used for links |
private static long |
serialVersionUID
Serialization ID |
private static boolean |
sidebarShowing
Whether to show the Key Sidebar at startup |
private JCheckBoxMenuItem |
sidebarToggle
|
private static String |
SPLASH_PROPS
|
private JSplitPane |
sptBooks
|
private ViewManager |
views
|
private static boolean |
viewSourceShowing
Whether to show the view source in the menu at startup |
Fields inherited from class javax.swing.JFrame |
---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
Desktop()
Construct a Desktop. |
Method Summary | |
---|---|
void |
activateURI(URIEvent ev)
This method is called to indicate that an URI can be processed. |
void |
bookChosen(DisplaySelectEvent ev)
This method is called to indicate that a command has been made. |
private void |
buildActionMap()
|
void |
checkForBooks()
|
private JCheckBoxMenuItem |
createCheckbox(XSLTProperty prop)
|
private void |
createComponents()
Call all the constructors |
private JMenu |
createEditMenu()
|
private JMenu |
createFileMenu()
Create the file menu |
private JMenu |
createHelpMenu()
|
private void |
createLayout()
Initialize the GUI, and display it. |
private JMenuBar |
createMenuBar(ToolBar toolbar)
|
private JMenu |
createNavigateMenu()
|
private JPopupMenu |
createPopupMenu()
|
private JRadioButtonMenuItem |
createRadioButton(ButtonGroup group,
XSLTProperty prop)
|
private ToolBar |
createToolBar()
|
private JMenu |
createToolsMenu()
|
private JMenu |
createVerseMenu()
|
Component |
createView()
Constructs an application appropriate view for the desktop. |
private JMenu |
createViewMenu(ToolBar toolbar)
Create the view menu. |
private void |
debug()
Sometimes we need to make some changes to debug the GUI. |
void |
enterURI(URIEvent ev)
This method is called to indicate that the mouse has entered the URI. |
void |
establishPreferredSize()
Get the size of the content panel and make that the preferred size. |
(package private) void |
fillChoiceFactory()
Setup the choices so that the options dialog knows what there is to select from. |
void |
generateConfig()
Load the config.xml file |
org.crosswire.common.config.Config |
getConfig()
|
static String |
getCSSOverride()
|
private ActionFactory |
getViewActions(ViewManager viewMgr)
|
ViewManager |
getViews()
|
static boolean |
isBibleViewReused()
|
boolean |
isCompareShowing()
|
static boolean |
isSidebarShowing()
|
static boolean |
isViewSourceShowing()
|
private void |
jump(org.crosswire.jsword.book.Book book,
String data)
Open the requested book and go to the requested key. |
void |
leaveURI(URIEvent ev)
This method is called to indicate that the mouse has left the URI. |
static void |
main(String[] args)
Central start point. |
void |
passageSelected(DisplaySelectEvent ev)
This method is called to indicate that a command has been made. |
private void |
readObject(ObjectInputStream is)
Serialization support. |
protected void |
refreshBooks()
Setup the book choices |
void |
selectHistory(int i)
|
static void |
setBibleViewReused(boolean reuse)
|
void |
setCloseEnabled(boolean enabled)
Are the close buttons enabled? |
void |
setCompareShowing(boolean show)
|
static void |
setCSSOverride(String override)
|
static void |
setSidebarShowing(boolean show)
|
static void |
setViewSourceShowing(boolean show)
|
void |
showStatusBar(boolean show)
Show or hide the status bar. |
void |
viewRemoved(ViewEvent event)
|
Methods inherited from class java.awt.Frame |
---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
private static final org.crosswire.common.util.CWProject PROJECT
private boolean hasRefBooks
private static final String SPLASH_PROPS
public static final String BIBLE_PROTOCOL
public static final String DICTIONARY_PROTOCOL
public static final String GREEK_DEF_PROTOCOL
public static final String HEBREW_DEF_PROTOCOL
public static final String GREEK_MORPH_PROTOCOL
public static final String HEBREW_MORPH_PROTOCOL
public static final String COMMENTARY_PROTOCOL
private static final String EMPTY_STRING
private static final String CONFIG_KEY
private static final String DESKTOP_KEY
private static final String CONV_KEY
private static final String CSWING_KEY
private transient org.crosswire.common.config.Config config
private static boolean sidebarShowing
private static boolean viewSourceShowing
private boolean compareShowing
private static boolean reuseBibleView
protected transient volatile ActionFactory actions
protected transient DesktopActions desktopActions
private static final ImageIcon ICON_APP
private transient ViewManager views
private JPanel corePanel
private JCheckBoxMenuItem sidebarToggle
private StatusBar barStatus
protected MultiBookPane reference
private JSplitPane sptBooks
private JPanel mainPanel
private transient org.crosswire.common.history.History history
private PropertyChangeSupport changeSupport
protected static final org.slf4j.Logger log
private static final long serialVersionUID
Constructor Detail |
---|
public Desktop()
Method Detail |
---|
public static void main(String[] args)
args
- The command line argumentsprivate void debug()
private void createComponents()
private ActionFactory getViewActions(ViewManager viewMgr)
private void createLayout()
private JMenuBar createMenuBar(ToolBar toolbar)
private void buildActionMap()
private JMenu createFileMenu()
private JMenu createEditMenu()
private JMenu createNavigateMenu()
private JRadioButtonMenuItem createRadioButton(ButtonGroup group, XSLTProperty prop)
private JCheckBoxMenuItem createCheckbox(XSLTProperty prop)
private JMenu createVerseMenu()
private JMenu createViewMenu(ToolBar toolbar)
private JMenu createToolsMenu()
private JMenu createHelpMenu()
private JPopupMenu createPopupMenu()
private ToolBar createToolBar()
public void establishPreferredSize()
public ViewManager getViews()
public Component createView()
ViewGenerator
createView
in interface ViewGenerator
public void viewRemoved(ViewEvent event)
viewRemoved
in interface ViewEventListener
public void bookChosen(DisplaySelectEvent ev)
DisplaySelectListener
bookChosen
in interface DisplaySelectListener
ev
- Describes the changepublic void passageSelected(DisplaySelectEvent ev)
DisplaySelectListener
passageSelected
in interface DisplaySelectListener
ev
- Describes the changepublic void selectHistory(int i)
public void activateURI(URIEvent ev)
URIEventListener
activateURI
in interface URIEventListener
ev
- Describes the URIprivate void jump(org.crosswire.jsword.book.Book book, String data)
book
- The book to usedata
- The key to findpublic void enterURI(URIEvent ev)
URIEventListener
enterURI
in interface URIEventListener
ev
- Describes the URIpublic void leaveURI(URIEvent ev)
URIEventListener
leaveURI
in interface URIEventListener
ev
- Describes the URIpublic void showStatusBar(boolean show)
show
- booleanpublic void setCloseEnabled(boolean enabled)
enabled
- The enabled statepublic final void generateConfig()
public void checkForBooks()
public static void setSidebarShowing(boolean show)
show
- Whether to show the KeySidebar at start up.public static boolean isSidebarShowing()
public static void setViewSourceShowing(boolean show)
show
- Whether to show the view source in menu at start up.public static boolean isViewSourceShowing()
public void setCompareShowing(boolean show)
show
- Whether to show differences between versions of the Biblepublic boolean isCompareShowing()
public static void setBibleViewReused(boolean reuse)
reuse
- Whether reuse the current BibleView.public static boolean isBibleViewReused()
public static void setCSSOverride(String override)
override
- The path to the CSS that should be used to override.public static String getCSSOverride()
final void fillChoiceFactory()
protected final void refreshBooks()
public org.crosswire.common.config.Config getConfig()
private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException
is
-
IOException
ClassNotFoundException
|
Copyright ยจ 2003-2013 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |