oracle.ide.model
Class Workspace
java.lang.Object
|
+--oracle.ide.model.DefaultDisplayable
|
+--oracle.ide.model.DefaultElement
|
+--oracle.ide.model.DefaultDocument
|
+--oracle.ide.model.DefaultNode
|
+--oracle.ide.model.DataNode
|
+--oracle.ide.model.DataContainer
|
+--oracle.ide.model.Workspace
- All Implemented Interfaces:
- Category, Container, Copyable, Data, Dirtyable, Displayable, Document, DynamicPropertySet, Element, Folder, LazyLoadable, Locatable, Node, Subject
- public class Workspace
- extends DataContainer
- implements Copyable, DynamicPropertySet
This a new class that is under development to replace Workspace.
Methods inherited from class oracle.ide.model.DataContainer |
add, add, add, canRemove, containsChild, copyToImpl, getBaseDirectory, getChildren, getListOfChildren, mayHaveChildren, remove, removeAll, removeAll, resetSubDirtyableOwners, setListOfChildren, setSubDirtyableOwner, size |
Methods inherited from class oracle.ide.model.DefaultDocument |
attach, copyToImpl, createSubject, detach, ensureOpen, equalsImpl, getInputStream, getLongLabel, getShortLabel, getSubject, getTimestamp, getTimestampDirectly, getToolTipText, isDirty, isNew, isOpen, isReadOnly, markDirty, notifyObservers, refreshTimestamp, setOpen, setTimestampDirectly |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface oracle.ide.model.Data |
getData |
EXT
public static final java.lang.String EXT
NAMESPACE_URI
public static final java.lang.String NAMESPACE_URI
ROOT_TAG
public static final java.lang.String ROOT_TAG
Workspace
public Workspace()
- Default constructor. Required for JavaBean status.
Workspace
public Workspace(Workspace workspace)
- Copy constructor.
close
public void close()
- Description copied from interface:
Document
- Closes the
Document
and unloads any associated data.
When this method returns, the state of the Document
object should be equivalent to when the Document
object has just been instantiated but not yet opened.
- Overrides:
close
in class DataContainer
- Following copied from class:
oracle.ide.model.DefaultDocument
- See Also:
Document.close()
copyTo
public java.lang.Object copyTo(java.lang.Object object)
- Design pattern for supporting strongly typed copying.
- Specified by:
copyTo
in interface Copyable
- Following copied from interface:
oracle.ide.util.Copyable
- Parameters:
target
- The target object to which the state of
this
object should be copied. If target
is null
, then the copyTo
method will
return a new instance of this
class.- Returns:
- The object to which the state of
this
object was copied. If the target
was
non-null
, then the return value is the same as the
target
object that was passed in; otherwise, the
return value is a new instance of this
class. - Throws:
java.lang.ClassCastException
- if target
is
non-null
and cannot be downcast to the type of
this
object.
copyToImpl
protected final void copyToImpl(Workspace copy)
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
equalsImpl
protected final boolean equalsImpl(Workspace workspace)
- This is a helper method for
equals(Object)
that can
also be used by subclasses that implement equals(Object)
.
It assumes that the argument is not null
.
getActiveProjectURL
public java.net.URL getActiveProjectURL()
- Returns the currently active project
URL
associated with
this Workspace
. If there is no currently active
project, null is returned.
This method will not open the workspace to determine the active
project URL
. If the workspace is closed, null is returned.
setActiveProjectURL
public void setActiveProjectURL(java.net.URL activeProjectURL)
getIcon
public javax.swing.Icon getIcon()
- Description copied from interface:
Displayable
- Returns an
Icon
that can be shown in association with this
Displayable
. Typically the icon will be used in a
tree control or list control. Therefore the icon must fit
naturally within the space normally given to items within those
controls. Such icons are usually 16x16 in size or, if there is a
one-pixel transparent padding around the edge, 18x18 in size. It
is strongly recommended that icons returned by this method be
either 16x16 or 18x18 in size. If null
is returned,
the control may show a default icon, or it may show no icon,
whichever is appropriate.
- Overrides:
getIcon
in class DefaultDisplayable
- Following copied from interface:
oracle.ide.model.Displayable
- Returns:
- the
Icon
to be displayed for the
Displayable
.
canAdd
public boolean canAdd(Element element)
Folder
interface method. Returns true
if
the specified Element
is an instance of
Project
; returns false
otherwise.
- Overrides:
canAdd
in class DataContainer
- See Also:
DefaultFolder.canAdd(Element)
,
Folder.canAdd(Element)
remove
public boolean remove(Element doc,
boolean notifyObservers)
- Description copied from interface:
Container
- This is a variant of the
Folder.remove(Element)
method
that accepts an additional flag that indiciates whether or not
notifications of the change should be sent to registered observers.
- Overrides:
remove
in class DataContainer
- Following copied from interface:
oracle.ide.model.Container
- Parameters:
element
- The Element
to be removed from this
Container
.notify
- If true
, any observers are notified
of the change. If false
, no notification is sent.
currentObjectStore
protected ObjectStore currentObjectStore()
- Overrides:
currentObjectStore
in class DataNode
currentActiveProject
public Project currentActiveProject()
- Returns the currently active
Project
associated with
this Workspace
. If there is no currently active
Project
, null is returned.
This method will not open the workspace to determine the active
project. If the workspace is closed, null is returned.
This method is called currentActiveProject
instead of getActiveProject
in order to avoid
having the "_activeProject" property get picked up by the
Introspector
.
setActiveProject
public void setActiveProject(Project activeProject)
getProperties
public java.util.Map getProperties()
- Description copied from interface:
DynamicPropertySet
- Retrieves a map holding the property-value pairs.
- Specified by:
getProperties
in interface DynamicPropertySet
setProperties
public void setProperties(java.util.Map properties)
- Description copied from interface:
DynamicPropertySet
- Sets the map holding the property-value pairs.
- Specified by:
setProperties
in interface DynamicPropertySet
getProperty
public java.lang.Object getProperty(java.lang.String name)
- Description copied from interface:
DynamicPropertySet
- Retrieves the value associated with a property.
- Specified by:
getProperty
in interface DynamicPropertySet
- Following copied from interface:
oracle.ide.util.DynamicPropertySet
- Parameters:
key
- the property key for which a value is desired.
exists.- Returns:
- the value of the requested property, or a
null
value
if the property does not exist or is not set.
getProperty
public java.lang.Object getProperty(java.lang.String name,
java.lang.Object defaultValue)
- Accessor to user data saved in the workspace file
- Specified by:
getProperty
in interface DynamicPropertySet
- Following copied from interface:
oracle.ide.util.DynamicPropertySet
- Parameters:
key
- the property key for which a value is desired.defaultValue
- the value to return if no value currently
exists.- Returns:
- the value of the requested property, or the default value
if the property does not exist.
setProperty
public void setProperty(java.lang.String name,
java.lang.Object value)
- Accessor to user data saved in the workspace file
- Specified by:
setProperty
in interface DynamicPropertySet
- Following copied from interface:
oracle.ide.util.DynamicPropertySet
- Parameters:
key
- the property key to setvalue
- the value to set