public class NewSkin extends Extension implements MDIManager
| Modifier and Type | Class and Description |
|---|---|
class |
NewSkin.DialogWindowListener
Listener para los eventos de cerrado de los dialogos.
|
class |
NewSkin.FrameListener |
ALIGN_CENTER, ALIGN_FIRST_LINE_END, ALIGN_FIRST_LINE_END_CASCADE, ALIGN_FIRST_LINE_START, ALIGN_LAST_LINE_END, ALIGN_LAST_LINE_START, ALIGN_LINE_END, ALIGN_LINE_START, ALIGN_PAGE_END, ALIGN_PAGE_START, DIALOG, TOOL, WINDOW| Constructor and Description |
|---|
NewSkin() |
| Modifier and Type | Method and Description |
|---|---|
IWindow |
addCentredWindow(IWindow p)
Creates a new frame with the provided contents, and shows this
new window.
|
IWindow |
addWindow(IWindow p)
Creates a new frame with the provided contents, and shows this
new window.
|
IWindow |
addWindow(IWindow p,
int align) |
void |
alignFrame(IWindow panel,
int mode) |
void |
centreFrame(IWindow panel)
Centres the Frame in the contentPane of the MainFrame.
|
void |
changeWindowInfo(IWindow w,
WindowInfo wi)
Updates the window properties (size, location, etc) according to the
provided WindowInfo object.
|
void |
closeAllWindows()
Close all the currently open windows
|
boolean |
closeSingletonWindow(java.lang.Class viewClass,
java.lang.Object model)
Close the SingletonWindow whose class and model are provided as
parameters.
|
boolean |
closeSingletonWindow(java.lang.Object model)
Close the SingletonWindow whose model is provided as parameter.
|
void |
closeWindow(IWindow p)
Close the provided window.
|
protected FrameWindowSupport |
createFrameWindowSupport(MDIFrame mainFrame)
Create the
FrameWindowSupport instance |
void |
execute(java.lang.String actionCommand)
This method is executed when the user clicks on any of the
controls associated with this extension (menus, tools, etc).
|
IWindow |
getActiveWindow()
Returns the currently active window, excluding the modal windows and the
PALETTE windows.
|
IWindow[] |
getAllWindows()
Gets all the open windows.
|
javax.swing.JDesktopPane |
getDesktopPane() |
IWindow |
getFocusWindow()
Returns the currently focused window, excluding the modal windows.
|
java.awt.image.BufferedImage |
getImagePreview() |
java.awt.Dimension |
getInternalSize() |
IWindow[] |
getOrderedWindows()
Gets all the open windows (as
MDIManager.getAllWindows()),
but in this method the windows are returned in the same
deepness order that they have in the application. |
SingletonWindow |
getSingletonWindow(java.lang.Class windowClass,
java.lang.Object model)
Return the window associated to the SingletonWindow class and the model
specified.
|
IWindow |
getWindow(javax.swing.JPanel panel)
Gets the associated IWindow to the panel shown with showWindow method.
|
WindowInfo |
getWindowInfo(IWindow w)
Gets the WindowInfo object associated with the provided window.
|
void |
init(MDIFrame f)
Initializes the MDIFrame.
|
void |
initialize()
Extension's initialization code should be here.
|
boolean |
isEnabled()
This method is invoked by Andami to check whether the extension
(and its associated controls) is enabled or disabled.
|
boolean |
isModalDialogShowing() |
boolean |
isVisible()
This method is invoked by Andami to check whether the extension
(and its associated controls) is visible or hidden.
|
void |
move(IWindow panel,
int x,
int y)
Change the position of the speficied window.
|
void |
moveToFrom(IWindow win) |
void |
refresh(IWindow win)
Forces a window to be repainted.
|
void |
restoreCursor()
Sets the normal cursor and unblocks events from main window.
|
void |
setBackgroundImage(javax.swing.ImageIcon image,
java.lang.String typeDesktop)
Sets the provided image as background image in the main window.
|
void |
setLocale(java.util.Locale locale) |
void |
setMaximum(IWindow v,
boolean bMaximum)
Maximizes or restores the provided window
|
void |
setWaitCursor()
Shows the wait cursor and blocks all the events from main window until
MDIManager.restoreCursor() is called. |
void |
showWindow(javax.swing.JPanel panel,
java.lang.String title,
WindowManager.MODE mode)
Useful method to simplify the presentation of a window.
|
public javax.swing.JDesktopPane getDesktopPane()
public java.awt.image.BufferedImage getImagePreview()
getImagePreview in interface MDIManagerpublic void init(MDIFrame f)
MDIManagerinit in interface MDIManagerf - Application's main frame.protected FrameWindowSupport createFrameWindowSupport(MDIFrame mainFrame)
FrameWindowSupport instancemainFrame - public IWindow addWindow(IWindow p) throws SingletonDialogAlreadyShownException
MDIManager
Creates a new frame with the provided contents, and shows this
new window. The new frame's properties are set according to
the WindowInfo object from IWindow's getWindowInfo()
method.
The new frame is disposed when closed.
If the provided IWindow also implements SingletonWindow, and another SingletonWindow already exists and uses the same model, this later window will be sent to the foreground and no new window will be created.
addWindow in interface MDIManagerp - Panel with the contents of the new window.SingletonDialogAlreadyShownExceptionpublic SingletonWindow getSingletonWindow(java.lang.Class windowClass, java.lang.Object model)
MDIManagergetSingletonWindow in interface MDIManagerpublic IWindow addCentredWindow(IWindow p) throws SingletonDialogAlreadyShownException
MDIManager
Creates a new frame with the provided contents, and shows this
new window. The new frame will be centered, regardless the
position specified in the WindowInfo object from IWindow's
getWindowInfo() method.
The new frame is disposed when closed.
If the provided IWindow also implements SingletonWindow, and another SingletonWindow already exists and uses the same model, this later window will be sent to the foreground and no new window will be created.
addCentredWindow in interface MDIManagerp - Panel with the contents of the new window.SingletonDialogAlreadyShownExceptionpublic IWindow addWindow(IWindow p, int align) throws SingletonDialogAlreadyShownException
addWindow in interface MDIManagerSingletonDialogAlreadyShownExceptionpublic void move(IWindow panel, int x, int y)
MDIManagermove in interface MDIManagerpublic void centreFrame(IWindow panel)
panel - The IWindow to centrepublic java.awt.Dimension getInternalSize()
getInternalSize in interface MDIManagerpublic void alignFrame(IWindow panel, int mode)
public void moveToFrom(IWindow win)
moveToFrom in interface MDIManagerpublic IWindow getActiveWindow()
MDIManagerReturns the currently active window, excluding the modal windows and the PALETTE windows. If the currently active window is modal or PALETTE type, the previous non-modal and non-PALETTE active window is returned.
Modal windows and PALETTE windows are considered to be auxiliary windows, that is the reason why they are not returned.
getActiveWindow in interface MDIManagerpublic IWindow getFocusWindow()
MDIManagerReturns the currently focused window, excluding the modal windows. If the currently focused window is modal, the previous non-modal focused window is returned.
getFocusWindow in interface MDIManagerpublic void closeWindow(IWindow p)
MDIManagercloseWindow in interface MDIManagerp - window to be closedpublic void closeAllWindows()
MDIManagercloseAllWindows in interface MDIManagerpublic WindowInfo getWindowInfo(IWindow w)
MDIManagergetWindowInfo in interface MDIManagerw - window whose information is to be retrievedWindowInfopublic void initialize()
IExtensioninitialize in interface IExtensionpublic void execute(java.lang.String actionCommand)
IExtensionexecute in interface IExtensionactionCommand - An String specifying the action to
execute. This is useful when there are different
controls associated with the same extension.public boolean isEnabled()
IExtensionisEnabled in interface IExtensionpublic boolean isVisible()
IExtensionisVisible in interface IExtensionpublic void setWaitCursor()
MDIManagerMDIManager.restoreCursor() is called.setWaitCursor in interface MDIManagerpublic void restoreCursor()
MDIManagerrestoreCursor in interface MDIManagerMDIManager.setWaitCursor()public boolean closeSingletonWindow(java.lang.Class viewClass,
java.lang.Object model)
MDIManagercloseSingletonWindow in interface MDIManagerviewClass - Class of the window which is to be closedmodel - Model of the window which is to be closedpublic boolean closeSingletonWindow(java.lang.Object model)
MDIManagercloseSingletonWindow in interface MDIManagermodel - Model of the window which is to be closedpublic IWindow[] getAllWindows()
MDIManagerPluginServices.getMainFrame().getAllWindows in interface MDIManagerpublic IWindow[] getOrderedWindows()
MDIManagerMDIManager.getAllWindows()),
but in this method the windows are returned in the same
deepness order that they have in the application.getOrderedWindows in interface MDIManagerpublic void setMaximum(IWindow v, boolean bMaximum) throws java.beans.PropertyVetoException
MDIManagersetMaximum in interface MDIManagerv - The window to be maximized or restoredbMaximum - If true, the window will be maximized,
if false, it will be restoredjava.beans.PropertyVetoExceptionpublic void changeWindowInfo(IWindow w, WindowInfo wi)
MDIManagerchangeWindowInfo in interface MDIManagerw - The window whose properties are to be changedwi - The WindowInfo object containing the new properties to be setpublic void refresh(IWindow win)
MDIManagerrefresh in interface MDIManagerwin - The window to be refreshed.public void setBackgroundImage(javax.swing.ImageIcon image,
java.lang.String typeDesktop)
MDIManagertypeDesktop argument.setBackgroundImage in interface MDIManagerimage - The image to be set as background imagetypeDesktop - Decides whether the image should be centered, set
in mosaic or expanded. Accepted values are: Theme.CENTERED,
Theme.MOSAIC and Theme.EXPAND.public void showWindow(javax.swing.JPanel panel,
java.lang.String title,
WindowManager.MODE mode)
MDIManagershowWindow in interface MDIManagerpanel - to show as a windowtitle - title of the windowmode - type of the window to createpublic IWindow getWindow(javax.swing.JPanel panel)
MDIManagergetWindow in interface MDIManagerpublic void setLocale(java.util.Locale locale)
setLocale in interface MDIManagerpublic boolean isModalDialogShowing()
isModalDialogShowing in interface MDIManager