|
JAPI 0.9.0 Yet another Java API API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.AbstractAction net.sf.japi.swing.bookmarks.BookmarkManager.Bookmark
public abstract static class BookmarkManager.Bookmark
Base class for bookmarks. There are two kinds of bookmarks:
BookmarkManager.BookmarkItem
s for normal Bookmarks with title and urlBookmarkManager.BookmarkFolder
s for Folders within Bookmarks with a title and (possibly) contents
Field Summary | |
---|---|
protected BookmarkManager.BookmarkFolder |
folder
The folder (parent) of this bookmark. |
Fields inherited from class javax.swing.AbstractAction |
---|
changeSupport, enabled |
Fields inherited from interface javax.swing.Action |
---|
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
Constructor Summary | |
---|---|
protected |
BookmarkManager.Bookmark(String title)
Create a Bookmark. |
Method Summary | |
---|---|
Enumeration<BookmarkManager.Bookmark> |
children()
Returns the children of the receiver as an Enumeration . |
abstract JMenuItem |
createMenu()
Create a MenuItem for this Bookmark |
boolean |
getAllowsChildren()
Returns true if the receiver allows children. |
BookmarkManager.Bookmark |
getChildAt(int childIndex)
Returns the child TreeNode at index
childIndex . |
int |
getChildCount()
Returns the number of children TreeNode s the receiver
contains. |
BookmarkManager.BookmarkFolder |
getFolder()
Get the folder (parent) of this bookmark. |
int |
getIndex(TreeNode node)
Returns the index of node in the receivers children. |
BookmarkManager.BookmarkFolder |
getParent()
Returns the parent TreeNode of the receiver. |
String |
getTitle()
Get this Bookmark's title. |
void |
insert(MutableTreeNode child,
int index)
Adds child to the receiver at index . |
boolean |
isLeaf()
Returns true if the receiver is a leaf. |
void |
remove(int index)
Removes the child at index from the receiver. |
void |
remove(MutableTreeNode child)
Removes node from the receiver. |
void |
removeFromParent()
Removes the receiver from its parent. |
void |
setFolder(BookmarkManager.BookmarkFolder folder)
Set the folder (parent) of this bookmark. |
void |
setParent(MutableTreeNode newParent)
Sets the parent of the receiver to newParent . |
void |
setTitle(String title)
Set this Bookmark's title. |
void |
setUserObject(Object object)
Resets the user object of the receiver to object . |
abstract void |
store(Node n)
Store bookmarks in an XML Document. |
String |
toString()
Returns a string representation of the object. |
Methods inherited from class javax.swing.AbstractAction |
---|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.event.ActionListener |
---|
actionPerformed |
Field Detail |
---|
protected BookmarkManager.BookmarkFolder folder
Constructor Detail |
---|
protected BookmarkManager.Bookmark(String title)
#setFolder(BookmarkFolder)
in order to make getParent()
for JTrees working.
title
- title for BookmarkMethod Detail |
---|
public String toString()
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
toString
in class Object
public BookmarkManager.BookmarkFolder getFolder()
public void setFolder(BookmarkManager.BookmarkFolder folder)
folder
- parent folder of this bookmarkpublic void setTitle(String title)
title
- new title for this Bookmarkpublic abstract JMenuItem createMenu()
public String getTitle()
public abstract void store(Node n)
n
- Node (Element or Document) to attach topublic Enumeration<BookmarkManager.Bookmark> children()
Enumeration
.
children
in interface TreeNode
public boolean getAllowsChildren()
getAllowsChildren
in interface TreeNode
public BookmarkManager.Bookmark getChildAt(int childIndex)
TreeNode
at index
childIndex
.
getChildAt
in interface TreeNode
public int getChildCount()
TreeNode
s the receiver
contains.
getChildCount
in interface TreeNode
public int getIndex(TreeNode node)
node
in the receivers children.
If the receiver does not contain node
, -1 will be
returned.
getIndex
in interface TreeNode
public BookmarkManager.BookmarkFolder getParent()
TreeNode
of the receiver.
getParent
in interface TreeNode
public boolean isLeaf()
isLeaf
in interface TreeNode
public void insert(MutableTreeNode child, int index)
child
to the receiver at index
.
child
will be messaged with setParent
.
insert
in interface MutableTreeNode
public void remove(int index)
index
from the receiver.
remove
in interface MutableTreeNode
public void remove(MutableTreeNode child)
node
from the receiver. setParent
will be messaged on node
.
remove
in interface MutableTreeNode
public void removeFromParent()
removeFromParent
in interface MutableTreeNode
public void setParent(MutableTreeNode newParent)
newParent
.
setParent
in interface MutableTreeNode
public void setUserObject(Object object)
object
.
setUserObject
in interface MutableTreeNode
|
JAPI Yet another Java API API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |