|
Extension SDK 9.0.5 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.ide.model.DefaultFilter
oracle.ide.model.FilelistFilter
oracle.jdeveloper.model.CategoryFilter
oracle.jdeveloper.model.ApplicationFilter
The ApplicationFilter
class organizes the children of an
application into a predefined structure. Children of the application that
implement the Category
interface are grouped based on the
registered categories. An application currently can be structured
into four categories: APPLICATION_CODE, WEB_CONTENT, RESOURCES, and
DATABASE.
Nested Class Summary |
Nested classes inherited from class oracle.jdeveloper.model.CategoryFilter |
CategoryFilter.CategoryRegistry, CategoryFilter.CatInfo, CategoryFilter.JProjectComparator |
Nested classes inherited from class oracle.ide.model.DefaultFilter |
DefaultFilter.SortedComparator, DefaultFilter.SortedFolderFirstComparator |
Field Summary | |
static int |
APPLICATION_CODE
|
static int |
DATABASE
|
static int |
RESOURCES
|
static int |
WEB_CONTENT
|
Fields inherited from class oracle.jdeveloper.model.CategoryFilter |
LAST_CATEGORY_SHIFT, OPTION_VIEW_AS_LIST, PROJECT_REBUILT |
Fields inherited from class oracle.ide.model.DefaultFilter |
folderFirstComparator, folderFirstComparator2, sortedComparator |
Fields inherited from interface oracle.ide.explorer.ChildFilter |
NO_OPTIONS |
Constructor Summary | |
ApplicationFilter()
|
|
ApplicationFilter(JProject project)
Constructor. |
Method Summary | |
static void |
addFilterHelper(ApplicationFilterHelper helper)
Add an ApplicationFilterHelper . |
static void |
addPackageObserver(Observer observer,
Project project)
Add an Observer to the list of observers to attach to any newly
created packages for the given project . |
PackageFolder |
findPackageFolder(java.net.URL url)
Finds the package folder associated with the specified url . |
static PackageFolder |
findPackageFolder(java.net.URL url,
Project project)
Finds the package folder associated with the specified url . |
protected CategoryFilter.CategoryRegistry |
getCategoryRegistry()
Subclass must override this method and return a registry containing valid categories. |
static java.util.List |
getFilterHelpers(java.lang.Class cls)
Return the list of ApplicationFilterHelper s that have
requested interested in the specified element class. |
JProject |
getJProject()
Get the current project. |
PackageFilter.PackageFactory |
getPackageFactory()
|
static PackageFilter.PackageFactory |
getPackageFactory(Project project)
|
PackageFolder |
getPackageFolder(java.net.URL url)
Returns the PackageFolder associated with the URL . |
static PackageFolder |
getPackageFolder(java.net.URL url,
Project project,
PackageFilter filter)
Returns the PackageFolder associated with the URL . |
static java.util.Iterator |
getPackages(Project project)
|
protected java.util.Iterator |
getProjectChildren()
|
Element |
getSubject()
Return the actual subject to which children are being added or removed. |
protected boolean |
handleAdd(Element element,
CategoryFolder folder,
java.util.List childrenAdded,
ChildFilter folderFilter,
Element subject,
boolean checkOwner)
|
protected boolean |
handleRemove(Element element,
CategoryFolder folder,
java.util.List childrenRemoved,
ChildFilter folderFilter,
Element subject)
|
static boolean |
isFilterSupported(int category,
int filter)
Returns whether the category with the specified ID supports the specified filter. |
static void |
registerCategory(int category,
java.lang.Class cls,
java.lang.String label,
javax.swing.Icon icon,
int filtersSupported)
Registers a new application category with the specified attributes. |
static void |
removeFilterHelper(ApplicationFilterHelper helper)
Remove the specified helper from the list of registered
ApplicationFilterHelper s. |
static PackageFolder |
removePackage(java.net.URL url,
Project project)
Remove the package pointed to by the url from the package
cache associated with the given project . |
static void |
removePackageObserver(Observer observer,
Project project)
Remove an Observer from the list of observers to attach to
any newly created packages for the given project . |
void |
update(java.lang.Object observed,
UpdateMessage change)
Notification message. |
Methods inherited from class oracle.jdeveloper.model.CategoryFilter |
cache, canRefresh, canSupportFilter, canUpdate, childrenAdded, childrenRemoved, closeChildren, findCategoryFolder, getCategoryNode, getChildren, getComparator, getOptions, getType, isListView, newCategory, refresh, registerCategories, setListView, setOptions, setOwner, uncache, update |
Methods inherited from class oracle.ide.model.FilelistFilter |
getProject, setProject |
Methods inherited from class oracle.ide.model.DefaultFilter |
checkElementAttributes, getIcon, getLongLabel, getOwner, getShortLabel, getToolTipText, getURLFilter, refreshExplorerNode, setURLFilter, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int APPLICATION_CODE
public static final int WEB_CONTENT
public static final int RESOURCES
public static final int DATABASE
Constructor Detail |
public ApplicationFilter()
public ApplicationFilter(JProject project)
project
- the project whose children are to be filtered.Method Detail |
public static void registerCategory(int category, java.lang.Class cls, java.lang.String label, javax.swing.Icon icon, int filtersSupported)
category
- The ID for this category. See CategoryFilter.newCategory()
.cls
- The CategoryFolder
subclass that represents this
category; use null
to specify a default
CategoryFolder
.label
- The display name used to represent this category.icon
- The display icon used to represent this category; use
null
to specify the default folder icon.filtersSupported
- The bit mask of FilterTypes
supported
by this category; specify FilterTypes.NONE
if no filters are
supported.public static boolean isFilterSupported(int category, int filter)
category
- the ID of the category.filter
- the ID of the filter to be supported, as specified by
one of the constants in FilterTypes
.public static void addFilterHelper(ApplicationFilterHelper helper)
ApplicationFilterHelper
. This helper will be called
when building the children of an application category. The helper
is only called if the helper indicates that is interested in
the category and if the helper is interested in the class of
node being processed.
public static void removeFilterHelper(ApplicationFilterHelper helper)
helper
from the list of registered
ApplicationFilterHelper
s.
public static PackageFilter.PackageFactory getPackageFactory(Project project)
project
- the project associated with the sought after factory.
PackageFilter.PackageFactory
.public static java.util.List getFilterHelpers(java.lang.Class cls)
ApplicationFilterHelper
s that have
requested interested in the specified element class.
public static PackageFolder getPackageFolder(java.net.URL url, Project project, PackageFilter filter)
PackageFolder
associated with the URL
. If the
PackageFolder
does not exist, a new Node
is created.
url
- unique URL
identifying the node.project
- the project associated with the package requested.filter
- the PackageFilter
currently in use.
public static PackageFolder findPackageFolder(java.net.URL url, Project project)
url
.
null
if no folder is found.public static java.util.Iterator getPackages(Project project)
Iterator
for traversing all PackageFolder
s in
the given project
.public static PackageFolder removePackage(java.net.URL url, Project project)
url
from the package
cache associated with the given project
.
null
if no package was
found.public static void addPackageObserver(Observer observer, Project project)
Observer
to the list of observers to attach to any newly
created packages for the given project
.
public static void removePackageObserver(Observer observer, Project project)
Observer
from the list of observers to attach to
any newly created packages for the given project
.
This method does not remove the observer from existing packages
already being observed.
public JProject getJProject()
public PackageFilter.PackageFactory getPackageFactory()
PackageFilter.PackageFactory
.public PackageFolder getPackageFolder(java.net.URL url)
PackageFolder
associated with the URL
. If the
PackageFolder
does not exist, a new Node
is created.
url
- unique URL
identifying the node.
public PackageFolder findPackageFolder(java.net.URL url)
url
.
null
if no folder is found.public Element getSubject()
public void update(java.lang.Object observed, UpdateMessage change)
Observer
update
in interface Observer
observed
- the subject whose state has changed.change
- what has changed.protected CategoryFilter.CategoryRegistry getCategoryRegistry()
CategoryFilter
getCategoryRegistry
in class CategoryFilter
protected java.util.Iterator getProjectChildren()
getProjectChildren
in class CategoryFilter
protected boolean handleRemove(Element element, CategoryFolder folder, java.util.List childrenRemoved, ChildFilter folderFilter, Element subject)
handleRemove
in class CategoryFilter
protected boolean handleAdd(Element element, CategoryFolder folder, java.util.List childrenAdded, ChildFilter folderFilter, Element subject, boolean checkOwner)
handleAdd
in class CategoryFilter
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.