|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.zfqjava.swing.JBean
public class JBean
JBean provides a abstract application panel.
The default layout manager is BorderLayout.
JBean provides some methods to create menu, button.
DefaultAction,
ResourceManager,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| 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 | |
|---|---|
static String |
ABOUT
|
static String |
CLEAR
|
static String |
CLEAR_ALL
|
static String |
COPY
|
static String |
CUT
|
static String |
EXIT
|
static String |
EXPORT
|
static String |
FILE
|
static String |
FIND
|
static String |
FIND_NEXT
|
static String |
HELP
|
static String |
IMPORT
|
static String |
NEW
|
static String |
OPEN
|
static String |
PAGE_SETUP
|
static String |
PASTE
|
static String |
PRINT
|
static String |
PRINT_PREVIEW
|
static String |
REDO
|
static String |
REPLACE
|
static String |
SAVE
|
static String |
SAVE_AS
|
static String |
SELECT_ALL
|
static String |
SPELL
|
static String |
TIP
|
static String |
TOOL
|
static String |
UNDO
|
static String |
VIEW
|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| 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, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JBean()
Constructs a JBean use the BorderLayout. |
|
| Method Summary | |
|---|---|
protected ActionManager |
createActionManager()
Creates the action manager. |
protected AbstractButton |
createButton(String name)
Creates a new JButton use the specified
action name. |
protected JFrame |
createFrame()
Creates a frame for the JBean. |
protected JInternalFrame |
createInternalFrame()
Creates a internal frame for the JBean. |
protected JMenu |
createMenu(String name)
Creates a new JMenu use the specified
action name. |
protected JMenuBar |
createMenuBar(String name)
Create a new JMenuBar use the specified name. |
protected JMenuItem |
createMenuItem(String name)
Creates a new JMenuItem use the specified
action name. |
protected JPopupMenu |
createPopupMenu(String name)
Create a new JPopupMenu use the specified name. |
protected ResourceManager |
createResourceManager()
Creates the resource manager. |
protected JStatusBar |
createStatusBar()
Creates a status bar. |
protected JToolBar |
createToolBar(String name)
Creates a new JToolBar use the specified name. |
protected UIFactory |
createUIFactory()
Creates the ui factory. |
void |
doAbout()
Invokes when the about action invoke. |
protected void |
doBeforeClose()
Invoke this method before close the frame. |
void |
doClose()
Invokes when the frame closing. |
void |
doExit()
Invokes when the exit action invoke. |
void |
doFeedback()
Invokes when the feedback action fired. |
void |
doLookAndFeel()
|
protected void |
doOpen(File[] files)
Open the specified files by drop, subclass can override this methods to open the files as needed. |
void |
doSplash()
|
void |
doTip()
Invokes when the tip action invoke. |
Action |
getAction(String name)
Returns the Action for the specified name. |
ActionManager |
getActionManager()
Returns the ActionManager |
int |
getDefaultCloseOperation()
Retutns the default close operation for this bean. |
int |
getExtendedState()
|
JFrame |
getFrame()
Returns the current frame. |
Icon |
getIcon(String key)
Returns the cion for the specified key from ResourceManager. |
JInternalFrame |
getInternalFrame()
Returns the current internal frame. |
ResourceManager |
getResourceManager()
Returns the ResourceManager |
JStatusBar |
getStatusBar()
Returns the JStatusBar |
String |
getString(String key)
Returns the string for the specified key from ResourceManager. |
String |
getTitle()
Returns the title for this JBean |
UIFactory |
getUIFactory()
Returns the UIFactory |
protected void |
init()
Adds component and configure the JBean |
void |
invokeAction(String name)
Invoke the action by the specified name. |
boolean |
isDefaultPropertiesEnabled()
Determines whethe enable the default properties, such "copyright-note", "logo-image", "application.name", "application.version". |
boolean |
isShowSplashOnStartup()
Determines whether show the splash window on startup, default is true. |
static void |
main(String[] args)
|
void |
setDefaultCloseOperation(int operation)
Sets the default close operation for this bean. |
void |
setDefaultPropertiesEnabled(boolean defaultPropertiesEnabled)
Sets the default properties enabled property, , such "copyright-note", "logo-image", "application.name", "application.version".Default is true. |
void |
setExtendedState(int extendedState)
|
void |
setShowSplashOnStartup(boolean showSplashOnStartup)
Sets the splash window show on startup. |
void |
setTitle(String title)
Sets the title for this JBean. |
void |
showFrame()
Pops up a frame contains the JBean with the
frame having a default title. |
void |
showInternalFrame(Component parent)
Pops up a internal frame contains the JBean with the
internal frame having a default title and parented to parent . |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String FILE
public static final String VIEW
public static final String TOOL
public static final String HELP
public static final String NEW
public static final String OPEN
public static final String SAVE
public static final String SAVE_AS
public static final String IMPORT
public static final String EXPORT
public static final String PAGE_SETUP
public static final String PRINT
public static final String PRINT_PREVIEW
public static final String EXIT
public static final String UNDO
public static final String REDO
public static final String CUT
public static final String COPY
public static final String PASTE
public static final String FIND
public static final String FIND_NEXT
public static final String REPLACE
public static final String CLEAR
public static final String CLEAR_ALL
public static final String SELECT_ALL
public static final String SPELL
public static final String TIP
public static final String ABOUT
| Constructor Detail |
|---|
public JBean()
JBean use the BorderLayout.
| Method Detail |
|---|
protected ResourceManager createResourceManager()
protected ActionManager createActionManager()
protected UIFactory createUIFactory()
protected JStatusBar createStatusBar()
public ResourceManager getResourceManager()
ResourceManager for this JBean.
- Returns:
- the ResourceManager
public ActionManager getActionManager()
ActionManager for this JBean.
- Returns:
- the ActionManager
public UIFactory getUIFactory()
UIFactory for this JBean.
- Returns:
- the UIFactory
public JStatusBar getStatusBar()
JStatusBar for this JBean.
- Returns:
- the JStatusBar
protected void init()
public void setTitle(String title)
JBean.
title - the titlegetTitle()public String getTitle()
JBean
setTitle(java.lang.String)public void setDefaultCloseOperation(int operation)
operation - the close operation:
getDefaultCloseOperation()public int getDefaultCloseOperation()
One of 4 legal values:
setDefaultCloseOperation(int)public void setExtendedState(int extendedState)
Frame.setExtendedStatepublic int getExtendedState()
Frame.setExtendedStatepublic void showFrame()
JBean with the
frame having a default title.
createFrame()protected JFrame createFrame()
JBean.
showFrame()public JFrame getFrame()
showFrame(),
createFrame()public void showInternalFrame(Component parent)
JBean with the
internal frame having a default title and parented to parent .
parent - the parentcreateInternalFrame()protected JInternalFrame createInternalFrame()
JBean.
showInternalFrame(java.awt.Component)public JInternalFrame getInternalFrame()
showInternalFrame(java.awt.Component),
createInternalFrame()protected void doOpen(File[] files)
files - the files to droppublic void doSplash()
public void doExit()
doClose() methods.
public void doTip()
public void doAbout()
public void doFeedback()
public void doLookAndFeel()
public void doClose()
protected void doBeforeClose()
throws ActionVetoException
ActionVetoException - if the close action cannot be permited.public void invokeAction(String name)
name - the action namepublic String getString(String key)
key - the key
public Icon getIcon(String key)
key - the key
public Action getAction(String name)
Action for the specified name.
name - the action nameprotected JMenuBar createMenuBar(String name)
JMenuBar use the specified name.
name - the name
protected JPopupMenu createPopupMenu(String name)
JPopupMenu use the specified name.
name - the name
protected JToolBar createToolBar(String name)
JToolBar use the specified name.
name - the name
protected JMenu createMenu(String name)
JMenu use the specified
action name.
name - the action nameprotected JMenuItem createMenuItem(String name)
JMenuItem use the specified
action name.
name - the action nameprotected AbstractButton createButton(String name)
JButton use the specified
action name.
name - the action namepublic static void main(String[] args)
public boolean isShowSplashOnStartup()
setShowSplashOnStartup(boolean)public void setShowSplashOnStartup(boolean showSplashOnStartup)
isShowSplashOnStartup()public boolean isDefaultPropertiesEnabled()
setDefaultPropertiesEnabled(boolean)public void setDefaultPropertiesEnabled(boolean defaultPropertiesEnabled)
isDefaultPropertiesEnabled()
|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||