This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 245063 - Add support for setting client properties on components
Summary: Add support for setting client properties on components
Status: NEW
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.0.1
Hardware: PC All
: P2 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-15 03:28 UTC by Trejkaz
Modified: 2015-09-11 16:25 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Trejkaz 2014-06-15 03:28:47 UTC
In the Aqua and Nimbus LAFs, client properties can be used to customise the appearance of components.

NetBeans does not currently support setting these except via custom code, but custom code is not used for simulation of the form or for layout preview, which makes it impossible to preview the form without running the entire application.

Notes:
* Being able to set arbitrary client properties would be useful too.
  Some component libraries (e.g. JIDE) also allow customising
  components arbitrarily via this means.
* Even though the String properties tend to behave like enums, it
  would be useful to be able to set any string, because a different
  look and feel might support more values than another.
* It would be useful to be able to bind some of these as well. For
  instance, Window.documentModified would often be updated based on
  a boolean property in the document being displayed.

The following is a list of properties supported in Aqua LAF for Java 5 and above. There are probably more in later versions, but I'm having trouble finding updated documentation.

JComponent.sizeVariant
  String: "regular", "small", "mini"
  Applies to: JLabel, JButton, JToggleButton, JCheckBox,
              JRadioButton, JComboBox, JProgressBar, JSlider,
              JTextField, JSpinner

JButton.buttonType
  String: "square", "gradient", "bevel", "textured", "roundRect",
          "recessed", "help", "segmented", "segmentedRoundRect",
          "segmentedCapsule", "segmentedTextured",
          "segmentedGradient"
  Applies to: JButton and subclasses

JButton.segmentPosition
  String: "first", "middle", "last", "only"
  Applies to: JButton and subclasses with JButton.buttonType
              set to "segmented", "segmentedRoundRect",
              "segmentedCapsule", or "segmentedTextured".

JComboBox.isPopDown
  Boolean
  Applies to: JComboBox

JComboBox.isSquare
  Boolean
  Applies to: JComboBox

JProgressBar.style
  String: "circular"
  Applies to: JProgressBar

JTableHeader.selectedColumn
  Number
  Applies to: JTableHeader

JTableHeader.sortDirection
  String
  Allowed Values: "ascending", "decending"

JTextField.variant
  String
  Allowed Values: "search"

JTextField.Search.FindPopup
  JPopupMenu
  Applies to: JTextField with JTextField.variant set to "search"

JTextField.Search.FindAction
  ActionListener
  Applies to: JTextField with JTextField.variant set to "search"

JTextField.Search.CancelAction
  ActionListener
  Applies to: JTextField with JTextField.variant set to "search"

Window.documentModified
  Boolean
  Applies to: JRootPane, JInternalFrame

Window.documentFile
  java.io.File
  Applies to: JRootPane

Window.style
  String: "small"
  Applies to: JRootPane

Window.alpha
  Float: 0.0 to 1.0 inclusive
  Applies to: JRootPane

Window.shadow
  Boolean
  Applies to: JRootPane

apple.awt.brushMetalLook
  Boolean
  Applies to: JRootPane

apple.awt.draggableWindowBackground
  Boolean
  Applies to: JRootPane

apple.awt.delayWindowOrdering
  Boolean
  Applies to: JRootPane