|
||||||||||
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.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected DesktopActions |
actions
|
private StatusBar |
barStatus
|
private static String |
BIBLE_PROTOCOL
|
private static String |
COMMENTARY_PROTOCOL
|
private 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 Dimension |
defaultSize
The default dimension for this frame |
private static String |
DESKTOP_KEY
|
private static String |
DICTIONARY_PROTOCOL
|
private static String |
EMPTY_STRING
|
private static String |
GREEK_DEF_PROTOCOL
|
private static String |
GREEK_MORPH_PROTOCOL
|
private boolean |
hasRefBooks
|
private static String |
HEBREW_DEF_PROTOCOL
|
private static String |
HEBREW_MORPH_PROTOCOL
|
private History |
history
|
private static ImageIcon |
ICON_APP
The application icon |
protected static Logger |
log
The log stream |
private JPanel |
mainPanel
|
private static Project |
PROJECT
|
private 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 |
sptBlog
|
private JSplitPane |
sptBooks
|
private ViewManager |
views
|
private static boolean |
webJournalShowing
Whether to show the web journal 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 |
activateURL(URLEvent ev)
This method is called to indicate that an URL can be processed. |
void |
bookChosen(DisplaySelectEvent ev)
This method is called to indicate that a command has been made. |
void |
checkForBooks()
|
private void |
createComponents()
Call all the constructors |
private JMenu |
createEditMenu()
|
private JMenu |
createFileMenu()
Create the file menu |
private JMenu |
createGoMenu()
|
private JMenu |
createHelpMenu()
|
private JMenuBar |
createMenuBar(ToolBar toolbar)
Cause the Journal to reset itself to preferred size |
private JPopupMenu |
createPopupMenu()
|
private ToolBar |
createToolBar()
|
private JMenu |
createToolsMenu()
|
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 |
enterURL(URLEvent ev)
This method is called to indicate that the mouse has entered the URL. |
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 |
Config |
getConfig()
|
static Dimension |
getDefaultSize()
|
static int |
getMaxHeight()
|
static int |
getMaxWidth()
|
ViewManager |
getViews()
|
private void |
init()
Initialize the GUI, and display it. |
static boolean |
isBibleViewReused()
|
static boolean |
isSidebarShowing()
|
static boolean |
isWebJournalShowing()
|
private void |
jump(Book book,
String data)
Open the requested book and go to the requested key. |
void |
leaveURL(URLEvent ev)
This method is called to indicate that the mouse has left the URL. |
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? |
static void |
setDefaultSize(Dimension newDefaultSize)
|
static void |
setMaxHeight(int maxHeight)
|
static void |
setMaxWidth(int maxWidth)
|
static void |
setSidebarShowing(boolean show)
|
static void |
setWebJournalShowing(boolean show)
|
void |
showStatusBar(boolean show)
Show or hide the status bar. |
void |
showWebJournal(boolean show)
Show or hide the web journal. |
void |
viewRemoved(ViewEvent event)
|
Methods inherited from class java.awt.Frame |
---|
addNotify, finalize, 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, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
private static final Project PROJECT
private boolean hasRefBooks
private static final String SPLASH_PROPS
private static final String BIBLE_PROTOCOL
private static final String DICTIONARY_PROTOCOL
private static final String GREEK_DEF_PROTOCOL
private static final String HEBREW_DEF_PROTOCOL
private static final String GREEK_MORPH_PROTOCOL
private static final String HEBREW_MORPH_PROTOCOL
private 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 Config config
private static boolean sidebarShowing
private static boolean webJournalShowing
private static boolean reuseBibleView
private static Dimension defaultSize
protected static final Logger log
protected transient DesktopActions actions
private static final ImageIcon ICON_APP
private transient ViewManager views
private JPanel corePanel
private JSplitPane sptBlog
private JCheckBoxMenuItem sidebarToggle
private StatusBar barStatus
private MultiBookPane reference
private JSplitPane sptBooks
private JPanel mainPanel
private transient History history
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 void init()
private JMenuBar createMenuBar(ToolBar toolbar)
private JPopupMenu createPopupMenu()
private ToolBar createToolBar()
private JMenu createFileMenu()
private JMenu createEditMenu()
private JMenu createGoMenu()
private JMenu createViewMenu(ToolBar toolbar)
private JMenu createToolsMenu()
private JMenu createHelpMenu()
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 activateURL(URLEvent ev)
URLEventListener
activateURL
in interface URLEventListener
ev
- Describes the URLprivate void jump(Book book, String data)
book
- The book to usedata
- The key to findpublic void enterURL(URLEvent ev)
URLEventListener
enterURL
in interface URLEventListener
ev
- Describes the URLpublic void leaveURL(URLEvent ev)
URLEventListener
leaveURL
in interface URLEventListener
ev
- Describes the URLpublic void showStatusBar(boolean show)
show
- booleanpublic void showWebJournal(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 setWebJournalShowing(boolean show)
show
- Whether to show the web journal at start up.public static boolean isWebJournalShowing()
public static void setBibleViewReused(boolean reuse)
reuse
- Whether reuse the current BibleView.public static boolean isBibleViewReused()
public static void setMaxHeight(int maxHeight)
maxHeight
- The maxHeight to set.public static int getMaxHeight()
public static int getMaxWidth()
public static void setMaxWidth(int maxWidth)
maxWidth
- The maxWidth to set.public static Dimension getDefaultSize()
public static void setDefaultSize(Dimension newDefaultSize)
newDefaultSize
- The defaultSize to set.final void fillChoiceFactory()
protected final void refreshBooks()
public Config getConfig()
private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException
is
-
IOException
ClassNotFoundException
|
Copyright ยจ 2003-2006 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |