Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

oracle.ide.layout
Class IdeLayout

java.lang.Object
  extended by oracle.ide.model.Node
      extended by oracle.ide.layout.Layout
          extended by oracle.ide.layout.IdeLayout
All Implemented Interfaces:
Displayable, Element, Folder, LazyLoadable, Locatable, Subject, PropertyAccess, Dirtyable

public final class IdeLayout
extends Layout
implements Folder

IdeLayout class. IdeLayout instances are layouts that can contain other layouts. For example, the design and debug layouts can contain other user created SimpleLayouts as their children.


Field Summary
 
Fields inherited from class oracle.ide.model.Node
LOG_READONLY
 
Constructor Summary
protected IdeLayout()
           
  IdeLayout(java.net.URL fileURL, java.lang.String shortLabel, ArrayResourceBundle iconBundle, int iconKey)
           
  IdeLayout(java.net.URL fileURL, java.lang.String shortLabel, javax.swing.Icon icon)
           
 
Method Summary
 boolean add(Element element)
          Appends a child Element to the end of the Folder.
 boolean canAdd(Element element)
          Other classes can call this method to determine whether the given Element can be added to the Folder.
 boolean canRemove(Element element)
          Other classes can call this method to determine whether the specified Element can be removed from this Folder.
protected  void closeImpl()
          Release the data associated with this item
 boolean containsChild(Element child)
          Returns true if the folder contains the specified child Element; returns false otherwise.
 boolean equals(java.lang.Object o)
           
protected  boolean equalsImpl(IdeLayout other)
           
 Layout findLayout(java.net.URL url)
          Find the layout associated with the specified url.
 Layout getActiveLayout()
           
 java.util.Iterator getChildren()
          This method is part of the Element interface to provide a convenient way of getting an Iterator over any contained child Elements without having to test the object's type with the instanceof operator or having to downcast to a more specific type.
 Layout getDefaults()
           
 javax.swing.Icon getIcon()
          Displayable interface method.
 java.io.InputStream getInputStream()
          Gets a InputStream that can be used to read the contents of this object.
protected  java.util.Map getLayoutMap()
           
 java.lang.String getLongLabel()
          Displayable interface method.
 java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
          Retrieves the value associated with a property.
 java.lang.String getShortLabel()
          Displayable interface method.
 java.lang.String getToolTipText()
          Displayable interface method.
 boolean mayHaveChildren()
          This method is part of the Element interface to provide a convenient way of determining whether an object may have children without having to test the object's type with the instanceof operator or having to downcast to a more specific type.
protected  void openImpl()
          Open (load) the data associated with this item.
 boolean remove(Element element)
          Removes the specified child Element.
 void removeAll()
          Removes all children from the folder.
 java.lang.Object removeProperty(java.lang.String key)
          Removes the property.
protected  void saveImpl()
          Force the node to be re-loaded from file.
protected  void setActiveLayout(Layout layout)
           
 java.lang.Object setProperty(java.lang.String key, java.lang.String value)
          Sets the value for a property.
 int size()
          Returns the current number of children in the folder.
 
Methods inherited from class oracle.ide.layout.Layout
getMenuFilter, getName, getOwner, isActive, isTrackedInNodeCache, setActive, setMenuFilter, setOwner, toString
 
Methods inherited from class oracle.ide.model.Node
addNodeListener, addNodeListenerForType, addNodeListenerForTypeHierarchy, attach, beginThreadNodeUsageCycle, callUnderReadLock, callUnderWriteLock, close, createSubject, delete, deleteImpl, detach, endThreadNodeUsage, endThreadNodeUsageCycle, ensureOpen, equalsImpl, getAttributes, getData, getSubject, getTimestamp, getTimestampLoadedUnsafe, getTransientProperties, getUnmodifiedTimestamp, getURL, isDirty, isLoaded, isMigrating, isNew, isOpen, isReadLocked, isReadOnly, isReadOrWriteLocked, isWriteLocked, lockCount, markDirty, markDirtyImpl, nodeLock, notifyObservers, open, readLock, readLockCount, readUnlock, refreshTimestamp, removeNodeListener, removeNodeListenerForType, removeNodeListenerForTypeHierarchy, rename, renameImpl, reportOpenException, revert, revertImpl, runUnderReadLock, runUnderWriteLock, save, setEventLog, setMigrating, setOpen, setReadOnly, setTimestampDirectly, setURL, tryRunUnderReadLock, tryRunUnderWriteLock, unsetMigrating, upgradeLock, upgradeUnlock, urlReadOnlyChanged, writeLock, writeLockCount, writeUnlock
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.ide.model.Element
getAttributes, getData
 
Methods inherited from interface oracle.ide.model.Displayable
toString
 

Constructor Detail

IdeLayout

public IdeLayout(java.net.URL fileURL,
                 java.lang.String shortLabel,
                 javax.swing.Icon icon)

IdeLayout

public IdeLayout(java.net.URL fileURL,
                 java.lang.String shortLabel,
                 ArrayResourceBundle iconBundle,
                 int iconKey)

IdeLayout

protected IdeLayout()
Method Detail

getProperty

public java.lang.String getProperty(java.lang.String key,
                                    java.lang.String defaultValue)
Description copied from interface: PropertyAccess
Retrieves the value associated with a property. If no value exists for the requested property, the specified default value is returned.

Specified by:
getProperty in interface PropertyAccess
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 java.lang.Object setProperty(java.lang.String key,
                                    java.lang.String value)
Description copied from interface: PropertyAccess
Sets the value for a property.

Specified by:
setProperty in interface PropertyAccess
Parameters:
key - the property key to set
value - the string value to set
Returns:
the previous value

removeProperty

public java.lang.Object removeProperty(java.lang.String key)
Description copied from interface: PropertyAccess
Removes the property.

Specified by:
removeProperty in interface PropertyAccess
Parameters:
key - the property key to remove
Returns:
the previous value

getActiveLayout

public Layout getActiveLayout()

findLayout

public Layout findLayout(java.net.URL url)
Find the layout associated with the specified url. If the url matches the default layout url return it, otherwise, look in the list of children.


getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Gets a InputStream that can be used to read the contents of this object.

Overrides:
getInputStream in class Node
Returns:
an input stream, or null if the node has no contents.
Throws:
java.io.IOException - if a security manager exists and its checkRead method denies read access.

openImpl

protected void openImpl()
                 throws java.io.IOException
Open (load) the data associated with this item.

Overrides:
openImpl in class Node
Throws:
java.io.IOException - if an I/O error occurred while opening

closeImpl

protected void closeImpl()
                  throws java.io.IOException
Release the data associated with this item

Overrides:
closeImpl in class Node
Throws:
java.io.IOException - if an I/O error occurred while closing

saveImpl

protected void saveImpl()
                 throws java.io.IOException
Force the node to be re-loaded from file.

Overrides:
saveImpl in class Node
Parameters:
shallow - do not save children if container. TBD
Throws:
java.io.IOException - if an I/O error occurred while saving

getDefaults

public Layout getDefaults()

getShortLabel

public java.lang.String getShortLabel()
Description copied from class: Node
Displayable interface method. The Node class returns the file name part of the currently set URL. If the currently set URL is null, then this method returns "<null>".

Specified by:
getShortLabel in interface Displayable
Overrides:
getShortLabel in class Layout
Returns:
a short descriptive label of the Displayable that can be shown to the user.

getIcon

public javax.swing.Icon getIcon()
Description copied from class: Node
Displayable interface method. The Node class returns a generic icon.

Specified by:
getIcon in interface Displayable
Overrides:
getIcon in class Node
Returns:
the Icon to be displayed for the Displayable.

getLongLabel

public java.lang.String getLongLabel()
Description copied from class: Node
Displayable interface method. The Node class returns the path name part of the currently set URL. If the currently set URL is null, then this method returns "<null>".

Specified by:
getLongLabel in interface Displayable
Overrides:
getLongLabel in class Node
Returns:
a long descriptive label of the Displayable that can be shown to the user.

getToolTipText

public java.lang.String getToolTipText()
Description copied from class: Node
Displayable interface method. The Node class returns returns the String form of the currently set URL.

Specified by:
getToolTipText in interface Displayable
Overrides:
getToolTipText in class Node
Returns:
the tooltip to show when the mouse pointer pauses over a UI component that represents this Displayable.

mayHaveChildren

public boolean mayHaveChildren()
Description copied from interface: Element
This method is part of the Element interface to provide a convenient way of determining whether an object may have children without having to test the object's type with the instanceof operator or having to downcast to a more specific type.

An implementation of Element that represents a leaf in a tree structure should return false from this method. An implementation of Element that could represent a non-leaf in a tree structure should return true from this method, even if it does not currently contain any children.

Specified by:
mayHaveChildren in interface Element
Overrides:
mayHaveChildren in class Node
Returns:
true if this Element may contain child Elements.

getChildren

public java.util.Iterator getChildren()
Description copied from interface: Element
This method is part of the Element interface to provide a convenient way of getting an Iterator over any contained child Elements without having to test the object's type with the instanceof operator or having to downcast to a more specific type.

An implementation of Element that represents a leaf in a tree structure should return null from this method. An implementation of Element that could represent a non-leaf in a tree structure should return either an Iterator over the child Elements or null if there are no children.

Specified by:
getChildren in interface Element
Overrides:
getChildren in class Layout
Returns:
an Iterator over any child Elements contained by this Element. If there are no children, null is returned.

add

public boolean add(Element element)
Description copied from interface: Folder
Appends a child Element to the end of the Folder.

Specified by:
add in interface Folder

remove

public boolean remove(Element element)
Description copied from interface: Folder
Removes the specified child Element. If the child object appears more than once, only the first instance is removed.

Specified by:
remove in interface Folder
Parameters:
element - The child object to remove.

canRemove

public boolean canRemove(Element element)
Description copied from interface: Folder
Other classes can call this method to determine whether the specified Element can be removed from this Folder.

Specified by:
canRemove in interface Folder
Parameters:
element - the Element that is about to be removed from this Folder.
Returns:
true if the specified Element can be removed from this Folder; false if the Element cannot be removed.

canAdd

public boolean canAdd(Element element)
Description copied from interface: Folder
Other classes can call this method to determine whether the given Element can be added to the Folder.

Specified by:
canAdd in interface Folder
Parameters:
element - the Element that is about to be added to this Folder.
Returns:
true if the specified Element can be added to this Folder; false if the Element cannot be added.

containsChild

public boolean containsChild(Element child)
Description copied from interface: Folder
Returns true if the folder contains the specified child Element; returns false otherwise.

Specified by:
containsChild in interface Folder

size

public int size()
Description copied from interface: Folder
Returns the current number of children in the folder.

Specified by:
size in interface Folder

removeAll

public void removeAll()
Description copied from interface: Folder
Removes all children from the folder.

Specified by:
removeAll in interface Folder

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

equalsImpl

protected final boolean equalsImpl(IdeLayout other)

setActiveLayout

protected void setActiveLayout(Layout layout)

getLayoutMap

protected java.util.Map getLayoutMap()

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

Copyright © 1997, 2013, Oracle. All rights reserved.