Managing the Component Palette
To use a class as a UI component in JBuilder's designers, it must be installed on the Component Palette. JBuilder comes with several sets of components already installed on the Component Palette. These components are grouped onto different pages. You can add components to the existing pages, or create new pages for them.
You may wish to install new components onto the Component Palette. These might be components you created yourself, or ones you obtained from a third party. Third party components will probably have their own installation programs. The following details explain how to install your own components to the Palette.
Adding a component to the Palette
If your component is a JavaBean, you can place it onto the Component Palette. For more information on creating components and JavaBeans, see the Component Writers Guide , and Beans Express.
The class files for components you wish to install must be placed in one of the directories named in your classpath. If the component is part of a package, then the class files must be placed in the appropriate subdirectory of any directory in your classpath.
For example, if you have a component named ExampleComponent that is in a package called xxx.yyy (so its full name is xxx.yyy.ExampleComponent), then place the ExampleComponent.class file in an xxx/yyy subdirectory of one of the classpath directories.
To place the component onto the Component Palette,
- Choose Tools|Configure Palette from the menu, or right-click the Component Palette and choose Properties. This displays the Palette Properties dialog box.
- Select the Pages tab of the dialog box. In the Pages column, select the Palette page on which you want your component to appear, or click the Add... button to create a new page.
- Select the class name for the component from either the Add from Archive page or the Add from Package page.
- Use the Add from Package page to select a class file from your project if you are still developing your Bean and haven't placed the classes into a .jar or .zip file yet used the Deployment Wizard.
Note: If you are using your Bean in a designer during its development, you will need to restart JBuilder if you change and recompile your Bean, or you won't see the effects of the change.
- Use the Add from Archive page to add the class from an archive file once you have deployed your Bean as a .jar or .zip file. This is also a way that your Bean customer can install your Bean from the .jar or .zip file onto the JBuilder palette.
- Click the Install button to add the component to the Palette.
- When you see the message "Installation complete, then click OK to close the Palette Properties dialog box.
Selecting an image for a Component Palette button
The image on a Component Palette button can be one of three things:
- An image provided by the Bean itself.
- A .GIF file you select from the Item Properties dialog box.
- A default image provided by JBuilder if neither of the above are provided.
To select the image for your Component Palette button,
- Choose Tools|Configure Palette from the menu, or right-click the Component Palette and choose Properties. This displays the Palette Properties dialog box.
- Select the Pages tab of the dialog box.
- Select the appropriate page in the Page column.
- Select the particular component in the Components column.
- Click the Properties... button to display the Item Properties dialog box.
- Do one of the following:
- Choose Use JavaBean Icon to use the image provided by the Bean for the button.
- Choose Select Image and press the Browse button to select a .GIF file to be displayed on the button.
For best results, use a 16x16 or 32x32 .GIF file.
- Click OK to close the Item Properties dialog box.
- Click OK on the Palette Properties dialog box when you're finished.
Removing a page or component from the Palette
To remove a page or component from the Palette,
- Choose Tools|Configure Palette from the menu, or right-click the Component Palette and choose Properties. This displays the Palette Properties dialog box.
- Select the Pages tab of the dialog box.
- Select the appropriate page in the Page column or the particular component in the Components column.
- Click Remove, then click OK.
Reorganizing the Component Palette
To change the order of the pages or components on the Palette,
- Choose Tools|Configure Palette from the menu, or right-click the Component Palette and choose Properties. This displays the Palette Properties dialog box.
- Select the Pages tab of the dialog box.
- Select a page in the Page column or a component in the Components column.
- Click either Move Up or Move Down to move the selected item to a new location.
- Repeat the previous step for any additional pages or components you want to move.
- Click OK when you are finished.
Components delivered on the Palette
Visual controls
Borland Controls |
AWT Controls |
Windows equivalent |
Description |
|
Button |
Push button |
Simple push button |
ButtonControl |
|
|
Graphical data aware push button |
ButtonBar |
|
|
Toolbar |
CheckBoxControl |
Checkbox |
Check box, Radio button |
On/off, true/false selection |
|
Label |
Static control |
Uneditable text display |
LabelControl |
|
|
Data aware label |
|
TextField |
Edit box |
Single line text input and editing |
TextFieldControl |
|
|
Data aware text field |
FieldControl |
|
|
Data type controlled input and editing |
ImageControl |
|
|
Image display, optionally data aware |
|
List |
List box |
List of text items |
ListControl |
|
|
Data aware list |
ChoiceControl |
Choice |
Combo box |
Drop-down selection list |
|
ScrollBar |
Scroll bar |
Scrolling and range positioning |
ScrollBarControl |
|
|
Data aware ScrollBar |
NavigatorControl |
|
|
Database navigation |
LocatorControl |
|
|
DataSet record selection |
TreeControl |
|
|
Outline or tree display |
TabsetControl |
|
|
Set of tabs |
GridControl |
|
|
Data aware spreadsheet |
StatusBar |
|
|
Data aware status bar |
TextAreaControl |
|
|
Multi-line, scrollable text entry area with model-view functionality |
|
ScrollPane |
|
Allows scrolling for one child component |
ShapeControl |
|
|
Allows you to place shape objects in your design |
Containers
Borland Containers |
AWT Containers |
Windows equivalent |
Description |
|
Panel |
Borderless child window |
UI container, defaults to parent's color and FlowLayout, borderless |
BevelPanel |
|
Child window |
UI container, defaults to gray and XYLayout, border with bevelled edge options |
GroupBox |
|
|
UI container with borders and a label at the top that groups other components |
SplitPanel |
|
|
UI Container with multiple panes |
TabsetPanel |
|
Tabbed child window |
Composite control with tabs at top or bottom, client area |
CheckBoxPanel |
|
|
BevelPanel with multiple check boxes which can be grouped |
Menus
AWT Menus | Windows equivalent | Description |
MenuBar | Menu bar | Menu bar anchored to top of Frame |
PopupMenu | Popup menu | Floating menu |
Dialogs
Borland Dialogs | Windows equivalent | Description |
Filer | Common File dialog | Opening and saving files |
ColorChooser | | Selecting a color |
FontChooser | | Setting font parameters |
Message | MessageBox | Displaying a message |
Data Access
Borland Dataset | Windows equivalent | Description |
Database | | JDBC connection to a SQL database |
QueryDataSet | | Data obtained from a SQL query |
ProcedureDataSet | | Data obtained from a SQL stored procedure |
TableDataSet | | Data obtained from a file |
DataSetView | | Alternate view of data |
TextDataFile | | Properties used to import data from a text file |
QueryResolver | | Saves changes to data using a query |