Package com.explodingpixels.macwidgets
Class MacWidgetFactory
- java.lang.Object
-
- com.explodingpixels.macwidgets.MacWidgetFactory
-
public class MacWidgetFactory extends java.lang.Object
A factory for creating various types of Mac style widgets. See each method's javadoc for detailed descriptions of the components, as well as screen shots and links to specific sections in Apples Human Interface Guidelines.
-
-
Constructor Summary
Constructors Constructor Description MacWidgetFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ComponentBottomBar
createComponentStatusBar()
static javax.swing.JLabel
createEmphasizedLabel(java.lang.String text)
static javax.swing.JTable
createITunesTable(javax.swing.table.TableModel tableModel)
Creates an iTunes style table like the one listed below:
Sorting indicators will be rendered if aTableUtils.SortDelegate
is installed on the associatedJTable
via theTableUtils.makeSortable(javax.swing.JTable, com.explodingpixels.widgets.TableUtils.SortDelegate)
method.static javax.swing.JScrollPane
createSourceListScrollPane(javax.swing.JComponent content)
static javax.swing.JComponent
createSpacer(int width, int height)
Creates a transparent spacer of the given width and height.static javax.swing.JSplitPane
createSplitPaneForSourceList(SourceList sourceList, javax.swing.JComponent component)
static javax.swing.JLabel
makeEmphasizedLabel(javax.swing.JLabel label)
static javax.swing.JLabel
makeEmphasizedLabel(javax.swing.JLabel label, java.awt.Color focusedColor, java.awt.Color unfocusedColor, java.awt.Color emphasisColor)
static javax.swing.JScrollPane
makeSourceListScrollPane(javax.swing.JScrollPane scrollPane)
-
-
-
Method Detail
-
createITunesTable
public static javax.swing.JTable createITunesTable(javax.swing.table.TableModel tableModel)
Creates an iTunes style table like the one listed below:
Sorting indicators will be rendered if aTableUtils.SortDelegate
is installed on the associatedJTable
via theTableUtils.makeSortable(javax.swing.JTable, com.explodingpixels.widgets.TableUtils.SortDelegate)
method. To wrap this table in an iApp styleJScrollPane
, seeIAppWidgetFactory.createScrollPane(java.awt.Component)
;
-
createComponentStatusBar
public static ComponentBottomBar createComponentStatusBar()
-
createSpacer
public static javax.swing.JComponent createSpacer(int width, int height)
Creates a transparent spacer of the given width and height. If you don't care about a particular dimension, that is, you only want a horiztonal spacer, than simply provide zero for the value your not interested in.- Parameters:
width
- the width of the spacer - zero if the width doesn't matter.height
- the height of the spacer - zero if the height doesn't matter.- Returns:
- a transparent spacer of the given size.
-
createEmphasizedLabel
public static javax.swing.JLabel createEmphasizedLabel(java.lang.String text)
-
makeEmphasizedLabel
public static javax.swing.JLabel makeEmphasizedLabel(javax.swing.JLabel label)
-
makeEmphasizedLabel
public static javax.swing.JLabel makeEmphasizedLabel(javax.swing.JLabel label, java.awt.Color focusedColor, java.awt.Color unfocusedColor, java.awt.Color emphasisColor)
-
createSplitPaneForSourceList
public static javax.swing.JSplitPane createSplitPaneForSourceList(SourceList sourceList, javax.swing.JComponent component)
-
createSourceListScrollPane
public static javax.swing.JScrollPane createSourceListScrollPane(javax.swing.JComponent content)
-
makeSourceListScrollPane
public static javax.swing.JScrollPane makeSourceListScrollPane(javax.swing.JScrollPane scrollPane)
-
-