borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.view
java.lang.Object +----java.awt.Component +----java.awt.Container +----java.awt.ScrollPane +----borland.jbcl.view.TreeView +----borland.jbcl.control.TreeControl
Variables Constructors Properties Methods Event Listeners
Implements GraphView, MenuContainer, ImageObserver, Serializable
Implements GraphView, which defines the behavior required of components that use a graph model, for accessing data items that are stored in a tree structure.
public static final int STYLE_ARROWS = 0x0002
public static final int STYLE_PLUSES = 0x0001
public TreeView()Constructs a TreeView with default property values.
public int getHIndent() public void setHIndent(int hIndent)
public boolean isHSnap() public void setHSnap(boolean hSnap)
public int getAlignment() public void setAlignment(int alignment)
public boolean isAutoEdit() public void setAutoEdit(boolean autoEdit)
public void setBackground(java.awt.Color color)
public boolean isBatchMode() public void setBatchMode(boolean batchMode)The batchMode property enables/disables all painting in the tree. This is used for programmatic mass updates to the tree's model, selection, or whatever - without triggering repaint messages.
public Dimension getBoxSize() public void setBoxSize(java.awt.Dimension boxSize)
public Component getCoreComponent()Returns the contained TreeCore (non-public) class instance as a Component.
public boolean isDirectDraw() public void setDirectDraw(boolean directDraw)
public boolean isDoubleBuffer() public void setDoubleBuffer(boolean doubleBuffer)The doubleBuffer property enables or disables the double-buffered screen painting built into the tree. The default is true, meaning that the tree paints all of the visible cells onto an off-screen image before blitting the image onto the screen (to prevent flicker). Setting doubleBuffer to false will disable this functionality, so that all ItemPainters will paint directly to the screen. This property is set to false when a user is placing a tree onto a Panel (or another container) that has its own double-buffering, or if the user really likes things that flicker.
public boolean isDragSubfocus() public void setDragSubfocus(boolean drag)The dragSubfocus property enables or disables dragging of the subfocus cell when dragging the mouse pointer over the tree (with the mouse button pressed). By default, this property is true.
public boolean isEditInPlace() public void setEditInPlace(boolean editInPlace)The editInPlace property enables or disables item editing in the tree. By default, this property is true, meaning that a user can edit the value. If set to false, the field data cannot by modified by the user; the data can only be changed through programmatic access to the tree's model.
public boolean isEditing()The editing property (read-only) returns true if an item is currently being edited in the tree.
public boolean isExpandByDefault() public void setExpandByDefault(boolean expand)The expandByDefault property specifies whether the tree component built with this view displays with all nodes expanded when it is first initialized. The default value is false.
public void setFont(java.awt.Font font)The font property specifies the font to use to show text items in the tree.
public void setForeground(java.awt.Color color)The foreground property specifies the color of the text, or other item, in the tree.
public Insets getItemMargins() public void setItemMargins(java.awt.Insets margins)The itemMargins property specifies the amount of space between the text and the edge of the field.
public int getItemOffset() public void setItemOffset(int itemOffset)
public int getLeftMargin() public void setLeftMargin(int leftMargin)
public GraphModel getModel() public void setModel(borland.jbcl.model.GraphModel model)Determines the data model for the component. TreeView requires a GraphModel, such as LinkedTreeContainer.
public boolean isPostOnEndEdit() public void setPostOnEndEdit(boolean post)The postOnEndEdit property specifies whether a pending edit on the data provided by the model should be saved or discarded when the edit is ended. This can happen, for example, when calling setModel() when an edit is in progress. When postOnEndEdit is true, changes are saved. When false, changes are discarded. The value of postOnEndEdit defaults to true.
public Dimension getPreferredSize()The preferredSize property specifies the size that you would prefer layout managers to use for this field.
public boolean isReadOnly() public void setReadOnly(boolean readOnly)Determines whether the nodes of the tree can be edited by the user.
public WritableGraphSelection getSelection() public void setSelection(borland.jbcl.model.WritableGraphSelection selection)Holds an array of the selected node or nodes.
public boolean isShowFocus() public void setShowFocus(boolean show)The showFocus property enables or disables the painting of the focus rectangle on the items in the tree. Specifically, the showFocus property turns on or off the FOCUSED bit in the state information that is passed to the ItemPainter when the tree is painted. If an ItemPainter ignores the FOCUSED bit, this property will have no effect. By default, showFocus is true.
public boolean isShowRoot() public void setShowRoot(boolean show)The showRoot property specifies whether to show the top-level node of the tree.
public boolean isSnapOrigin() public void setSnapOrigin(boolean snapOrigin)The snapOrigin property controls whether or not the tree will automatically snap the scroll position to align the top item with the top edge of the tree. If set to false, the tree will not snap the scroll position, and it will scroll smoothly with changes to the subfocus item. By default, this property is true.
public int getStyle() public void setStyle(int style)Whether to show collapsed parent nodes as pluses or arrows (triangles).
public GraphLocation getSubfocus() public void setSubfocus(borland.jbcl.model.GraphLocation subfocus)The subfocus property defines the 'current' node (defined by a GraphLocation) in the tree. This is the node that is receiving keyboard input.
public int getTopMargin() public void setTopMargin(int topMargin)
public int getVgap() public void setVgap(int vgap)
public GraphViewManager getViewManager() public void setViewManager(borland.jbcl.model.GraphViewManager viewManager)Determines the view manager for a component built with this view.
public WritableGraphModel getWriteModel()A read-only property that returns the writable model object attached to this tree component, if the model object exists. If no writable model exists, this method returns null.
public void addNotify()Hook to open the DataSet supplying this tree control when the tree is displayed, if the DataSet's autoOpen property is set. Calls java.awt.Choice.html#addNotify() to create the ChoiceControl's peer, which allows changing the look of the tree without changing its functionality. Initializes the tree if not already initialized.
public void collapse(borland.jbcl.model.GraphLocation location)Collapses from view the children of the node specified by location.
public void collapseAll(borland.jbcl.model.GraphLocation location)Collapse a particular node and all of its children.
public void expand(borland.jbcl.model.GraphLocation location)Expands into view the children of the node specified by location.
public void expandAll(borland.jbcl.model.GraphLocation location)Expand a particular node and all of its children.
public Rectangle getNodeRect(borland.jbcl.model.GraphLocation node)
public GraphLocation hitTest(int xPos, int yPos)Returns the address (GraphLocation) of the node at the coordinates specified. Coordinates are relative to the entire scrollable region inside of the TreeView.
public boolean isExpanded(borland.jbcl.model.GraphLocation location)Check if a particular node is expanded.
public void refresh()
public void repaintNode(borland.jbcl.model.GraphLocation location)
public void repaintNodes()
public void requestFocus()
public void startEdit(borland.jbcl.model.GraphLocation node)Starts an edit session at 'node'. If editInPlace is false or if readOnly is true, this method is a no-op.
public void toggleExpanded(borland.jbcl.model.GraphLocation location)Toggle the state of a particular node.
public void addActionListener(java.awt.event.ActionListener l) public void removeActionListener(java.awt.event.ActionListener l)
public synchronized void addComponentListener(java.awt.event.ComponentListener l) public synchronized void removeComponentListener(java.awt.event.ComponentListener l)
public synchronized void addContainerListener(java.awt.event.ContainerListener l) public void removeContainerListener(java.awt.event.ContainerListener l)
public void addFocusListener(java.awt.event.FocusListener l) public void removeFocusListener(java.awt.event.FocusListener l)
public void addKeyListener(java.awt.event.KeyListener l) public void removeKeyListener(java.awt.event.KeyListener l)
public void addModelListener(borland.jbcl.model.GraphModelListener listener) public void removeModelListener(borland.jbcl.model.GraphModelListener listener)
public void addMouseListener(java.awt.event.MouseListener l) public void removeMouseListener(java.awt.event.MouseListener l)
public void addMouseMotionListener(java.awt.event.MouseMotionListener l) public void removeMouseMotionListener(java.awt.event.MouseMotionListener l)
public void addSelectionListener(borland.jbcl.model.GraphSelectionListener listener) public void removeSelectionListener(borland.jbcl.model.GraphSelectionListener listener)
public void addSubfocusListener(borland.jbcl.model.GraphSubfocusListener l) public void removeSubfocusListener(borland.jbcl.model.GraphSubfocusListener l)
public void addTreeListener(borland.jbcl.view.TreeListener l) public void removeTreeListener(borland.jbcl.view.TreeListener l)