borland Packages borland Class Hierarchy
Package borland.jbcl.view
About the view package
The view package contains views, item painters, item editors, and view managers, for building
composite components. Composite components are JavaBeans components that use data-aware, model-view
architecture for easy updating and live editing.
These classes are combined with classes in the control package to form composite components. Most of
the processing for composite components is in the view classes; many of the control classes are wrappers for
view classes.
The view package contains all the views used by the JBCL control package. Some views do not have a direct
control counterpart. For example, HeaderView and ColumnView are both used in the
GridControl.
The view package also contains several item painters and item editors. Some of these are used by JBCL controls and others are provided for your convenience. Some of the item painters and item editors are wrappers. For example, if you want to display an image and a string for each data item in the model, you could use a CompositeItemPainter, which is constructed with one ImageItemPainter and one TextItemPainter.
Visit the
javabeans.writing
newsgroup on the Borland Web page at
news://forums.borland.com/borland.public.jbuilder.javabeans.writing.
This newsgroup is dedicated to issues about writing JavaBeans in JBuilder
and is actively monitored by our support engineers
as well as the JBuilder Development team.
See also:
Interfaces
Classes and Components
Overview of classes in the view package
Composite-item classes
A composite data item combines multiple data items into a single multi-part data item in a control, such as showing an image and a text string as an item in a list control.
- CompositeItemPainter - Paints composite items in a control. Constructed with an ImageItemPainter and a TextItemPainter. Tiles two separate item painters horizontally or vertically.
- CompositeItemEditor - Enables editing composite items from within a control. Uses a CompositeItemPainter to calculate the rectangles for the individual items, and delegates ItemEditor methods to other item editors.
Graph and Tree classes
- GraphView - Defines the behavior required of components that use a graph model, for accessing data items that are stored in a tree structure.
- TreeView - Implements GraphView.
- TreeEvent - Generated when a tree item event occurs. Events are itemContracted and itemExpanded.
- TreeListener - Define methods that respond to all tree events. Implement this if your component responds to events that occur in a tree component.
- TreeAdapter - A helper class to allow easy implementation of the TreeItemListener interface. Instantiate this in your component, and override the desired handler methods for the tree item events which your component responds to.
Item editor classes
- CustomItemEditor -
Extend this class to create your own specialized item editor.
- ImageItemEditor - Enables editing an image that is currently displayed in a model-view control. Edits items of type java.awt.Image.
- JComboBoxItemEditor - A Choice item editor.
ItemPainter classes
- BorderItemPainter - Paints a shaded, 3-dimensional border around model-view controls. Puts a specific border state around another item painter. Borders can have a number of different painting styles and 3-dimensional effects.
- ButtonItemPainter - Paints a button with a shaded edge that changes when the button is pressed. Puts a button border around another item painter. This button-type border can respond to the state of the enclosed item.
- CheckboxItemPainter - An ItemEditor that paints the check within a CheckBox.
- CheckboxStateItemPainter - A CheckBoxItemPainter that determines whether a check box is checked based on user-specified states.
- CustomItemPainter -
Extend this class to create your own specialized item painter.
- FocusableItemPainter - Paints a focus rectangle around the data item with the focus, in a control.
- SelectableItemPainter -
An item painter for selectable items.
- StateItemPainter - Paints items differently, depending upon the data item's state. States are registered with the item painter.
- StateImageItemPainter - Paints image items differently, depending upon the data item's state. States are registered with the item painter.
- ColorItemPainter - Paints the color of the data item passed to it.
- ImageItemPainter - Paints an image as an item in a model-view control. Paints items of type java.awt.Image.
- ImageArrayItemPainter - Paints an image as an item in a list, for displaying in a model-view control. Paints images selected from an array based upon the index value passed to it.
- ImageButtonItemPainter - Paints an image on a button model-view component.
Matrix, Grid, and Header classes
- MatrixView - Defines the basic behavior required of all components that use a matrix model to retrieve, display, and edit a grid of items.
- GridView - Implements the basic behavior required of all components that use a matrix model to retrieve, display, and edit a grid of items.
- ColumnView - Provides persistent storage for properties that affect how information is displayed, and provides default property values for some other views.
- HeaderView - A horizontal or vertical header control for a grid.
- HeaderAdapter - An adapter class for the HeaderListener interface.
- HeaderEvent - Indicates that the user performed an action on a header, such as clicking or resizing.
- HeaderListener - An object of a class that implements this interface can be added as an event listener to HeaderEvent events.
Singleton classes
- SingletonView - Defines the basic behavior required of all components that use a singleton model to retrieve, display, and edit a single data item.
- SingletonModelView -
Interface that defines simple properties that exist on all views of a SingletonModel data source.
Text view classes
- TextFieldView - A view element for developing new model-view components that display a single line of text. Requires a singleton model and singleton view manager.
- TextAreaView - A view element for developing new model-view components that display multiple lines of text in a scrolling region. Requires a singleton model and singleton view manager.
- EllipsisTextItemPainter - Extracts text and paints it in the given rectangle.
- TextItemPainter - Paints text items, such as String objects, in a model-view control. Supports alignment, margins around the text, and item formatters.
- WrappedTextItemPainter - An item painter for selectable text in model-view components. Performs word-wrap for long lines.
- BooleanToggleItemEditor - An ItemEditor that processes input by toggling a boolean value to the opposite value.
- TextItemEditor - Edits text data items, such as String objects, in a model-view control.
- ExpandingTextItemEditor - A text editor that expands as you type, for items in a control.
- TextWrapper - Calculates where to break lines.
Vector classes
- VectorView - Defines the basic behavior required of all components that use a vector model to retrieve, display, and edit a list of items.
- SizeVector - A small interface defining size properties for use by the internal JBCL classes FixedSizeVector and VariableSizeVector.
Views for controls
- ButtonView - A view element for a button component.
- CheckboxView - A view element for a checkbox component.
- ChoiceView - A view element for a choice menu component.
- FieldView - A view element for a field component.
- LabelView - A view element for a label component.
- ListView - A view element for a list component.
- TabsetView - A view element for a tabset component.
Miscellaneous view classes
- BeanPanel - A convenient panel class to use as a superclass for JavaBean views and controls. Sub-dispatches focus events, key events, and mouse events; manages action listeners; and manages tab/focus awareness.
- ChoiceItemEditor - Enables editing an item in a choice menu.
- Spacer - Used to put space between other components in layouts.
- CustomItemListener - An interface for
listening to a view manager receive requests for ItemPainters and ItemEditors.