Skip to: Site menu | Main content

[image]

Groovy 

      Download | Documentation | Developers | Community

An agile dynamic language for the Java Platform

JideBuilder Add comment to Wiki View in Wiki Edit Wiki page Printable Version

JideBuilder is a Groovy builder for the open source JIDE Common Layer

Contribution Overview

JideBuilder will let you create Jide components and standard Swing components as SwingBuilder does, because it doesn't override the default names of previously registered components in SwingBuilder, this means that you can mix both types of components with the same builder.

def jide = new JideBuilder()
   def frame = jide.frame( id: 'frame', title: 'JideBuilder' ){
      panel( layout: new BorderLayout(5,5) ){
      button( label: "Swing", constraints: BorderLayout.WEST )
      jideButton( label: "Jide", constraints: BorderLayout.EAST )
      textField( constraints: BorderLayout.NORTH )
      calculator( constraints: BorderLayout.CENTER )
   }
}

There are 5 *Searchable components that will add searching capabilities to a previously created widget or an internal one, exposing the searchable widget and the searchable wrapper if an 'id' attribute was provided, for example ComboBoxSearchable:

def jide = new JideBuilder()
   def frame = jide.frame( id: 'frame', title: 'JideBuilder' ){
      panel( layout: new BorderLayout(5,5) ){
      comboBox( id: "mycombo", items: [1,2,3] )
      comboBoxSearchable( id: "c1", comboBox: mycombo )
      comboBoxSearchable( id: "c2", items: [4,5,6] )
   }
}
assertNotNull jide.ci_searchable

JIDE Common Layer defines a basic structure for dialogs with StandardDialog, which is an abstract class, you may create your own dialogs based on that template by calling 'standardDialog()', by default all 3 panels will be empty, but yout can provide your own content by calling 'dialogBannerPanel()', 'dialogContentPanel()' and 'dialogButtonPanel()' inside its closure.

All JTextComponents (even those created with regular SwingBuilder methods) will accept a 'selectAll' property, which will call com.jidesoft.swing.SelectAllUtils.install() on the component.
SearchableBar has an additional property 'install' which will register a SearchableBar.Installer automatically into the inmediate container. This property must be a Map and may have the following properties:

constraints: must be a valid Object accepted by the container's layout (required). keyStroke: must be a javax.swing.KeyStroke, defaults to CTRL + F (optional).

Team Members

Andres Almiray [aalmiray at users dot sourceforge dot net]

Download

jidebuilder-1.0
svg-salamander-1.0

Installing

Drop jidebuilder-1.0 into $GROOVY_HOME/lib along with is dependencies

Pre-requisites

Groovy 1.5 is required to use JideBuilder.

Documentation

Alphabetical list of components

Element Class Notes
animator Animator  
autoCompletion AutoCompletion Wraps an existing JComboBox with 'comboBox' attribute
Wraps an existing JTextComponent with 'textComponent' attribute
Will create an internal JTextField if 'textComponent' and 'comboBox' are ommitted
If 'textComponent' is specified (or internal JTextField is created), 'searchable' or 'list'
must also be specified
Additional attributes may be set on the wrapped component
autoCompletionComboBox AutoCompletionComboBox  
autoResizingTextArea AutoResizingTextArea  
bannerPanel BannerPanel  
bottom
JideSwingUtilities.createBottomPanel
buttonPanel ButtonPanel  
calculator Calculator  
center
JideSwingUtilities.createCenterPanel
checkBoxList CheckBoxList  
checkBoxListWithSelectable CheckBoxListWithSelectable  
checkBoxTree CheckBoxTree  
clickThroughLabel ClickThroughLabel  
comboBoxSearchable ComboBoxSearchable Wraps an existing JComboBox with 'comboBox' attribute
Will create an internal JComboBox if 'comboBox' is ommitted
Additional attributes may be set on the wrapped component
Obeys 'items' when creating an internal JComboBox.
contentContainer ContentContainer  
dateSpinner DateSpinner  
dialogBannerPanel DialogBannerPanel (from JideBuilder) Use it inside standardDialog
dialogButtonPanel DialogButtonPanel (from JideBuilder) Use it inside standardDialog
dialogContentPanel DialogContentPanel (from JideBuilder) Use it inside standardDialog
dialogPage DefaultDialogPage (from JideBuilder) Use it inside a multiplePageDialog
Add a 'closure' attribute as the body of lazyInitialize() default does nothing
fileIntelliHints FileIntelliHints Needs 'textComponent' attribute
Additional attributes may be set on the wrapped component
folderChooser FolderChooser  
gripper Gripper  
headerBox HeaderBox  
jideButton JideButton  
jideBorderLayout JideBorderLayout  
jideBoxLayout JideBoxLayout  
jideMenu JideMenu Use a closure with 'customize' attribute to create a PopupMenuConfigurer
jideOptionPane JideOptionPane  
jidePopup JidePopup  
jidePopupMenu JidePopupMenu  
jideScrollPane JideScrollPane  
jideSplitButton JideSplitButton Use a closure with 'customize' attribute to create a PopupMenuConfigurer
jideSplitPane JideSplitPane  
jideTabbedPane JideTabbedPane  
jideToggleButton JideToggleButton  
jideToggleSplitButton JideToggleSplitButton Use a closure with 'customize' attribute to create a PopupMenuConfigurer
labeledTextField LabeledTextField  
left
JideSwingUtilities.createLeftPanel
listDataIntelliHints ListDataIntelliHints Needs 'textComponent' and 'completionList' attributes,
Additional attributes may be set on the wrapped component
listSearchable ListSearchable Wraps an existing JList with 'list' attribute
Will create an internal JList if 'list' is ommitted
Additional attributes may be set on the wrapped component
multilineLabel MultilineLabel  
multiplePageDialog MultiplePageDialog  
multiplePageDialogPane MultiplePageDialogPane  
nullButton NullButton  
nullCheckBox NullCheckBox  
nullJideButton NullJideButton  
nullLabel NullLabel  
nullPanel NullPanel  
nullRadioButton NullRadioButton  
nullTristateCheckBox NullTristateCheckBox  
paintPanel PaintPanel  
pointSpinner PointSpinner  
popupMenuCustomizer DefaultPopupMenuCustomizer (from JideBuilder) Use 'closure' attribute to define the body of customize()
rangeSlider RangeSlider  
resizableDialog ResizableDialog  
resizableFrame ResizableFrame  
resizablePanel ResizablePanel  
resizableWindow ResizableWindow  
right
JideSwingUtilities.createRightPanel
searchableBar SearchableBar Wraps an existing Searchable with 'searchable' attribute
Additional attributes may be set on the wrapped component
simpleScrollPane SimpleScrollPane  
splitButtonGroup SplitButtonGroup  
standardDialog DefaultStandardDialog (from JideBuilder) Use 'dialogBannerPanel, 'dialodContentPanel' and 'dialogButtonPanel'
to provide additional configuration for each panel
styledLabel StyledLabel  
tableSearchable TableSearchable Wraps an existing JTable with 'table' attribute
Will create an internal JTable if 'table' is ommitted
Additional attributes may be set on the wrapped component
textComponentSearchable TextComponentSearchable Wraps an existing JTextComponent with 'textComponent' attribute
Will create an internal JTextField if 'textComponent' is ommitted
Additional attributes may be set on the wrapped component
top
JideSwingUtilities.createTopPanel
treeSearchable TreeSearchable Wraps an existing JTree with 'tree' attribute
Will create an internal JTree if 'tree' is ommitted
Additional attributes may be set on the wrapped component
tristateCheckBox TristateCheckBox  
svgIcon ResizableSVGIcon
path: same as svgResourcePath but allows aliases trackSize: enables/disables resizing (default: false) resizePercentage: controls how much the icon will change size, value must be in range 10..100 (default: 100) retainAspectRatio: controls how resizing will take effect (default: true) size: alias for 'preferredSize'

Developers

Andres Almiray

Building

JideBuilder uses Maven2 as its build tool, which means that if you want to
build your own version of JideBuilder from source you'll need to have it
installed.  Follow the instructions at http://maven.apache.org
Once Maven2 is installed you will also need to install two other dependencies

Install them on your local Maven2 repo if needed with the following command

 mvn install:installFile -DgroupId=<group> -Dversion=<version> -Dpackaging=jar \
     -DartifactId=<depname> -Dfile=<jarfile>

substituting the text inside < > with the correct package, version, name and jar file.

Contributing

Please contact the team members by e-mail.

 


You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser