public class ProjectExtension extends Extension implements IExtensionStatus
| Modifier and Type | Class and Description |
|---|---|
class |
ProjectExtension.UnsavedProject
Implements the IUnsavedData interface to show unsaved projects in the
Unsavad Data dialog.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
PROJECT_FILE_CHOOSER_ID |
static String |
PROJECTENCODING
Deprecated.
see PersistentManager
|
| Constructor and Description |
|---|
ProjectExtension() |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(AfterSavingListener l)
Adds the specified after saving listener to receive
"after saving file events" from this component.
|
void |
addListener(BeforeSavingListener l)
Adds the specified before saving listener to receive
"before saving file events" from this component.
|
void |
execute(String command)
This method is executed when the user clicks on any of the
controls associated with this extension (menus, tools, etc).
|
void |
execute(String actionCommand,
Object[] args) |
protected void |
fireAfterSavingFileEvent(SaveEvent evt)
Reports a after saving file event.
|
protected void |
fireBeforeSavingFileEvent(SaveEvent evt)
Reports a before saving file event.
|
AfterSavingListener[] |
getAfterSavingListeners()
Returns an array of all the after saving listeners registered on this
component.
|
BeforeSavingListener[] |
getBeforeSavingListeners()
Returns an array of all the before saving listeners registered on this
component.
|
static String |
getPath() |
Project |
getProject()
Devuelve el proyecto.
|
ProjectWindow |
getProjectFrame() |
IWindow |
getProjectWindow() |
IMonitorableTask[] |
getRunningProcesses()
Gets an array of the traceable background tasks associated with this
extension.
|
IExtensionStatus |
getStatus()
Gets the status of the extension, which may be queried to check
if the extension has some unsaved data or some associated background
tasks.
|
IUnsavedData[] |
getUnsavedData()
Gets an array of the UnsavedData objects, which contain information about
the unsaved data and allows to save it.
|
boolean |
hasRunningProcesses()
This method is used to check if the extension has some associated
background process which is currently running.
|
boolean |
hasUnsavedData()
This method is used to check if the extension has some unsaved data.
|
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 |
isVisible()
This method is invoked by Andami to check whether the extension
(and its associated controls) is visible or hidden.
|
void |
postInitialize()
Extension's post-initialization code should be here.
|
Project |
readProject(File file)
Lee del XML el proyecto.
|
Project |
readProject(String path) |
void |
removeListener(AfterSavingListener l)
Removes the specified after saving listener so that it no longer receives
save file events from this component.
|
void |
removeListener(BeforeSavingListener l)
Removes the specified before saving listener so that it no longer
receives save file events from this component.
|
static void |
setPath(String path) |
void |
setProject(Project p)
Sets the project
|
void |
showProjectWindow()
Muestra la ventana con el gestor de proyectos.
|
void |
showProjectWindow(WindowInfo wi)
Muestra la ventana con el gestor de proyectos, con las propiedades de
ventana especificadas.
|
boolean |
writeProject(File file,
Project p)
Escribe el proyecto en XML.
|
boolean |
writeProject(File file,
Project p,
boolean askConfirmation)
Escribe el proyecto en XML.
|
public static final String PROJECT_FILE_CHOOSER_ID
public static String PROJECTENCODING
public void initialize()
IExtensioninitialize in interface IExtensionpublic ProjectWindow getProjectFrame()
public void showProjectWindow()
public void showProjectWindow(WindowInfo wi)
public void execute(String command)
IExtensionexecute in interface IExtensioncommand - An String specifying the action to
execute. This is useful when there are different
controls associated with the same extension.public void execute(String actionCommand, Object[] args)
execute in interface IExtensionExecuteWithArgsexecute in class Extensionpublic void postInitialize()
IExtensioninitialize()
has been called for ALL the extensions.postInitialize in interface IExtensionpostInitialize in class Extensioncom.iver.mdiApp.plugins.IExtension#postInitialize()public boolean writeProject(File file, Project p)
file - Fichero.p - Proyecto.public boolean writeProject(File file, Project p, boolean askConfirmation)
file - Fichero.p - Proyecto.askConfirmation - booleanpublic Project readProject(File file)
file - Fichero.public Project getProject()
public boolean isEnabled()
IExtensionisEnabled in interface IExtensionIExtension.isEnabled()public boolean isVisible()
IExtensionisVisible in interface IExtensionIExtension.isVisible()public void setProject(Project p)
p - public static String getPath()
public static void setPath(String path)
public IWindow getProjectWindow()
public IExtensionStatus getStatus()
IExtensiongetStatus in interface IExtensiongetStatus in class ExtensionIExtensionStatuspublic boolean hasUnsavedData()
IExtensionStatushasUnsavedData in interface IExtensionStatuspublic IUnsavedData[] getUnsavedData()
IExtensionStatusGets an array of the UnsavedData objects, which contain information about the unsaved data and allows to save it.
getUnsavedData in interface IExtensionStatuspublic IMonitorableTask[] getRunningProcesses()
IExtensionStatusGets an array of the traceable background tasks associated with this extension. These tasks may be tracked, canceled, etc.
getRunningProcesses in interface IExtensionStatuspublic boolean hasRunningProcesses()
IExtensionStatushasRunningProcesses in interface IExtensionStatuspublic void addListener(BeforeSavingListener l)
l - the before saving listener.SaveEvent,
BeforeSavingListener,
removeListener(BeforeSavingListener),
getBeforeSavingListeners()public void addListener(AfterSavingListener l)
l - the after saving listener.SaveEvent,
AfterSavingListener,
removeListener(AfterSavingListener),
getAfterSavingListeners()public BeforeSavingListener[] getBeforeSavingListeners()
BeforeSavingListeners or an
empty array if no key listeners are currently registered#addBeforeSavingListener(BeforeSavingListener),
#removeBeforeSavingListener(BeforeSavingListener)public AfterSavingListener[] getAfterSavingListeners()
AfterSavingListeners or an
empty array if no key listeners are currently registered#addAfterSavingListener(AfterSavingListener),
#removeAfterSavingListenerpublic void removeListener(BeforeSavingListener l)
l is null, no exception is thrown and no action
is performed.l - the before saving listenerSaveEvent,
BeforeSavingListener,
addListener(BeforeSavingListener),
getBeforeSavingListeners()public void removeListener(AfterSavingListener l)
l is
null, no exception is thrown and no action is performed.l - the after saving listenerSaveEvent,
AfterSavingListener,
addListener(AfterSavingListener),
getAfterSavingListeners()protected void fireBeforeSavingFileEvent(SaveEvent evt)
evt - the before saving file eventprotected void fireAfterSavingFileEvent(SaveEvent evt)
evt - the after saving file event