|
|||||||||
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
com.lightdev.app.shtm.FrmMain
public class FrmMain
Main window of application SimplyHTML.
This class constructs the main window and all of its GUI elements such as menus, etc.
It defines a set of inner classes creating actions which can be connected to menus, buttons or instantiated individually.
Nested Class Summary | |
---|---|
class |
FrmMain.AppendTableColAction
append a new table col |
class |
FrmMain.AppendTableRowAction
append a new table row |
class |
FrmMain.BoldAction
|
class |
FrmMain.DeleteTableColAction
delete a table col |
class |
FrmMain.DeleteTableRowAction
delete a table row |
class |
FrmMain.DocumentTitleAction
set the title of the currently active document |
class |
FrmMain.EditAnchorsAction
action to edit anchors inside a document |
class |
FrmMain.EditLinkAction
action to edit a link |
class |
FrmMain.EditNamedStyleAction
action to change the paragraph style |
class |
FrmMain.FindReplaceAction
action to find and replace a given text |
class |
FrmMain.FontAction
Show a dialog to format fonts |
class |
FrmMain.FontFamilyAction
change a font family setting |
class |
FrmMain.FontFamilyPicker
a JComboBox for selecting a font family names from those available in the system. |
class |
FrmMain.FontSizeAction
change a font size setting |
class |
FrmMain.FontSizePicker
a JComboBox for selecting a font size |
class |
FrmMain.FormatImageAction
|
class |
FrmMain.FormatListAction
Change list formatting |
class |
FrmMain.FormatParaAction
action to change the paragraph style |
class |
FrmMain.FormatTableAction
format table attributes |
class |
FrmMain.GCAction
force a garbage collection. |
class |
FrmMain.InsertImageAction
|
class |
FrmMain.InsertTableAction
insert a new table |
class |
FrmMain.InsertTableColAction
insert a new table column |
class |
FrmMain.InsertTableRowAction
insert a new table row |
class |
FrmMain.ItalicAction
|
class |
FrmMain.NextTableCellAction
action to move to the next cell in a table |
class |
FrmMain.PrevTableCellAction
action to move to the previous cell in a table |
class |
FrmMain.RedoAction
RedoAction for the edit menu |
class |
FrmMain.RepeatKeyWatcher
watch for key events that are automatically repeated due to the user holding down a key. |
class |
FrmMain.SetDefaultStyleRefAction
action to set a reference to the default style sheet (for being able to use an already existing style sheet without having to define named styles) |
class |
FrmMain.SetStyleAction
action to set the style |
class |
FrmMain.SetTagAction
action to set the tag type |
class |
FrmMain.ShowElementTreeAction
Action that brings up a JFrame with a JTree showing the structure of the document in the currently active DocumentPane. |
class |
FrmMain.SHTMLEditCopyAction
just adds a normal name to the superclasse's action |
class |
FrmMain.SHTMLEditCutAction
just adds a normal name to the superclasse's action |
class |
FrmMain.SHTMLEditPasteAction
just adds a normal name to the superclasse's action |
class |
FrmMain.SHTMLEditPrefsAction
|
class |
FrmMain.SHTMLEditSelectAllAction
|
class |
FrmMain.SHTMLFileCloseAction
close a document. |
class |
FrmMain.SHTMLFileCloseAllAction
close all documents currently shown. |
class |
FrmMain.SHTMLFileExitAction
exit the application. |
class |
FrmMain.SHTMLFileNewAction
create a new empty document and show it |
class |
FrmMain.SHTMLFileOpenAction
open an existing document from file and show it |
class |
FrmMain.SHTMLFileSaveAction
save a document |
class |
FrmMain.SHTMLFileSaveAllAction
|
class |
FrmMain.SHTMLFileSaveAsAction
save a document under a different name and/or location |
class |
FrmMain.SHTMLFileTestAction
a slot for testing certain things conveniently during development |
class |
FrmMain.SHTMLHelpAppInfoAction
show information about SimplyHTML in a dialog |
class |
FrmMain.ToggleAction
action to toggle an attribute |
class |
FrmMain.ToggleListAction
toggle list formatting for a given type of list on/off |
class |
FrmMain.UnderlineAction
|
class |
FrmMain.UndoAction
UndoAction for the edit menu |
class |
FrmMain.UndoHandler
inner class for handling undoable edit events |
Nested classes/interfaces inherited from class javax.swing.JFrame |
---|
javax.swing.JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
---|
java.awt.Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
---|
java.awt.Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
static java.lang.String |
ACTION_SELECTED
|
static java.lang.String |
ACTION_SELECTED_KEY
|
static java.lang.String |
ACTION_UNSELECTED
|
static java.lang.String |
APP_HELP_NAME
|
static java.lang.String |
APP_NAME
|
static java.lang.String |
APP_TEMP_DIR
|
static java.lang.String |
closeAction
|
static java.lang.String |
closeAllAction
|
static java.lang.String |
documentTitleAction
|
static DynamicResource |
dynRes
single instance of a dynamic resource for use by all |
java.lang.String |
editPrefsAction
|
static java.lang.String |
FILE_LAST_OPEN
|
static java.lang.String |
FILE_LAST_SAVE
|
static java.lang.String |
findReplaceAction
|
java.lang.String |
helpMenuId
help menu ID |
java.lang.String |
helpTopicsAction
|
static java.lang.String |
IMAGE_DIR
|
static java.lang.String |
JAVA_HELP_EXT
|
static java.awt.Frame |
mainFrame
static reference to this instance of class FrmMain |
static java.lang.String |
newAction
action names these have to correspond with the keys in the resource bundle to allow for dynamic menu creation and control |
static java.lang.String |
nextTableCellAction
|
static java.lang.String |
openAction
|
static PluginManager |
pluginManager
the plug-in manager of SimplyHTML |
java.lang.String |
pluginMenuId
plugin menu ID |
static java.lang.String |
prevTableCellAction
|
static java.util.ResourceBundle |
resources
SimplyHTML's main resource bundle (plug-ins use their own) |
static java.lang.String |
saveAllAction
|
static java.lang.String |
saveAsAction
|
static java.lang.String |
setDefaultStyleRefAction
|
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 | |
---|---|
FrmMain()
construct a new main application frame |
Method Summary | |
---|---|
void |
addDocumentPaneListener(DocumentPane.DocumentPaneListener listener)
add a DocumentPaneListener from the currently active DocumentPane (if any) |
void |
adjustDividers()
adjust the divider sizes of SimplyHTML's SplitPanel according to visibility |
void |
caretUpdate(javax.swing.event.CaretEvent e)
caret listener implementation to track format changes |
void |
clearDockPanels()
|
javax.swing.JToolBar |
createToolBar(java.lang.String nm)
Create a tool bar. |
void |
doSave(DocumentPane dp)
save a document and catch possible errors this is shared by save and saveAs so we put it here to avoid redundancy |
static void |
getActionProperties(javax.swing.Action action,
java.lang.String cmd)
get action properties from the associated resource bundle |
int |
getActiveTabNo()
|
static java.io.File |
getAppTempDir()
get the temporary directory of SimplyHTML |
java.lang.String |
getCurrentDocName()
get the name of the file for the document shown in the currently open DocumentPane |
DocumentPane |
getCurrentDocumentPane()
get the DocumentPane object that is currently active |
java.io.File |
getCurrentFile()
get the file object for the document shown in the currently open DocumentPane |
DynamicResource |
getDynRes()
get the DynamicResource used in this instance of FrmMain |
SHTMLEditorPane |
getEditor()
|
static javax.help.HelpBroker |
getHelpBroker()
get the HelpBroker of our application |
static javax.swing.text.AttributeSet |
getMaxAttributes(javax.swing.text.Element e,
javax.swing.text.html.StyleSheet s)
|
javax.swing.text.AttributeSet |
getMaxAttributes(SHTMLEditorPane editor,
java.lang.String elemName)
Get all attributes that can be found in the element tree starting at the highest parent down to the character element at the current position in the document. |
java.util.ResourceBundle |
getResources()
get the resource bundle of this instance of FrmMain |
void |
initPlugins()
find plug-ins and load them accordingly, i.e. |
protected void |
processWindowEvent(java.awt.event.WindowEvent e)
catch requests to close the application's main frame to ensure proper clean up before the application is actually terminated. |
void |
refreshPluginDisplay(SHTMLPlugin pi)
refresh the display for a given plug-in |
void |
registerDocument()
register FrmMain as an object which has interest in events from a given document pane |
void |
removeDocumentPaneListener(DocumentPane.DocumentPaneListener listener)
remove a DocumentPaneListener from the currently active DocumentPane (if any) |
void |
stateChanged(javax.swing.event.ChangeEvent e)
change listener to be applied to our tabbed pane so that always the currently active components are known |
void |
unregisterDocument()
remove FrmMain as a registered object from a given document pane and its components remove all plug-ins owned by this FrmMain from SimplyHTML objects too |
void |
updateActions()
update all actions |
Methods inherited from class javax.swing.JFrame |
---|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update |
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.awt.Window |
---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle |
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 |
---|
public static final java.lang.String APP_NAME
public static final java.lang.String APP_HELP_NAME
public static final java.lang.String APP_TEMP_DIR
public static final java.lang.String IMAGE_DIR
public static final java.lang.String JAVA_HELP_EXT
public static final java.lang.String ACTION_SELECTED_KEY
public static final java.lang.String ACTION_SELECTED
public static final java.lang.String ACTION_UNSELECTED
public static final java.lang.String FILE_LAST_OPEN
public static final java.lang.String FILE_LAST_SAVE
public static java.awt.Frame mainFrame
public static DynamicResource dynRes
public static java.util.ResourceBundle resources
public static PluginManager pluginManager
public final java.lang.String pluginMenuId
public final java.lang.String helpMenuId
public static final java.lang.String newAction
public static final java.lang.String openAction
public static final java.lang.String closeAction
public static final java.lang.String closeAllAction
public static final java.lang.String saveAsAction
public final java.lang.String helpTopicsAction
public static final java.lang.String nextTableCellAction
public static final java.lang.String prevTableCellAction
public final java.lang.String editPrefsAction
public static final java.lang.String saveAllAction
public static final java.lang.String documentTitleAction
public static final java.lang.String setDefaultStyleRefAction
public static final java.lang.String findReplaceAction
Constructor Detail |
---|
public FrmMain()
Method Detail |
---|
public DynamicResource getDynRes()
public java.util.ResourceBundle getResources()
public static java.io.File getAppTempDir()
public java.io.File getCurrentFile()
public java.lang.String getCurrentDocName()
public SHTMLEditorPane getEditor()
public DocumentPane getCurrentDocumentPane()
public void addDocumentPaneListener(DocumentPane.DocumentPaneListener listener)
public void removeDocumentPaneListener(DocumentPane.DocumentPaneListener listener)
public void initPlugins()
public void adjustDividers()
public void clearDockPanels()
public void refreshPluginDisplay(SHTMLPlugin pi)
pi
- the plug-in to refreshpublic static javax.help.HelpBroker getHelpBroker()
HelpBroker
of our application
HelpBroker
to be used for help displaypublic void updateActions()
protected void processWindowEvent(java.awt.event.WindowEvent e)
processWindowEvent
in class javax.swing.JFrame
public javax.swing.JToolBar createToolBar(java.lang.String nm)
nm
- the name of the tool bar definition in the resource file
public void registerDocument()
public void unregisterDocument()
public void doSave(DocumentPane dp)
dp
- the document pane containing the document to savepublic static void getActionProperties(javax.swing.Action action, java.lang.String cmd)
action
- the action to apply properties tocmd
- the name of the action to get properties forpublic int getActiveTabNo()
public void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged
in interface javax.swing.event.ChangeListener
public void caretUpdate(javax.swing.event.CaretEvent e)
caretUpdate
in interface javax.swing.event.CaretListener
public javax.swing.text.AttributeSet getMaxAttributes(SHTMLEditorPane editor, java.lang.String elemName)
editor
- the editor pane to combine attributes from
public static javax.swing.text.AttributeSet getMaxAttributes(javax.swing.text.Element e, javax.swing.text.html.StyleSheet s)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |