public class MacComponentFactory extends DefaultComponentFactory
| Modifier | Constructor and Description |
|---|---|
protected |
MacComponentFactory()
Constructs a new factory.
|
| Modifier and Type | Method and Description |
|---|---|
Dateline |
createDateline(Timeline timeline)
Creates a new
Dateline for the given Gantt chart and timeline. |
static JLabel |
createEmphasizedLabel(String text)
Creates an emphasized label with the given text.
|
Eventline |
createEventline(Timeline timeline,
Dateline dateline)
Creates a new
Eventline for the given Gantt chart and timeline. |
LayerContainer |
createLayerContainer(AbstractGanttChart gc,
TreeTable table,
IGanttChartModel model)
Creates a
LayerContainer for the given Gantt chart and tree table
combination. |
JComponent |
createLayerContainerCorner(LayerContainer lc,
String corner)
Creates a new component that will be placed in the specified corner of
the layer container scrollpane.
|
LayerContainerRowHeader |
createLayerContainerRowHeader(LayerContainer lc)
Creates a new
LayerContainerRowHeader that will be used for the
given layer container. |
LayerContainerScrollPane |
createLayerContainerScrollPane(LayerContainer lc,
LayerContainerRowHeader rowHeader,
Timeline timeline,
boolean primary)
Returns the scrollpane used for the given layer container.
|
JSplitPane |
createSplitPane()
Creates the splitpane used by the Gantt chart for changing the sizes of
the left-hand side and the right-hand side.
|
Timeline |
createTimeline(AbstractGanttChart gc)
Creates a new
Timeline for the given Gantt chart. |
TreeTable |
createTreeTable(AbstractGanttChart gc,
ITreeTableModel model)
Creates a
TreeTable for the given Gantt chart. |
JComponent |
createTreeTableCorner(TreeTable table,
String corner)
Creates a component that will be placed in the upper left corner of the
scrollpane that contains the tree table.
|
TreeTableHeader |
createTreeTableHeader(AbstractGanttChart gc)
Creates a
TreeTableHeader for the given Gantt chart. |
TreeTableRowHeader |
createTreeTableRowHeader(TreeTable table)
Creates a new
TreeTableRowHeader that will be used for the given
tree table. |
TreeTableScrollPane |
createTreeTableScrollPane(TreeTable table,
TreeTableRowHeader rowHeader,
TreeTableHeader header,
boolean primary)
Creates the scrollpane used for scrolling the given tree table.
|
static MacComponentFactory |
getInstance()
Always returns the same instance of the factory.
|
static JLabel |
makeEmphasizedLabel(JLabel label)
Turns the given label into an emphasized label.
|
static JLabel |
makeEmphasizedLabel(JLabel label,
Color focusedColor,
Color unfocusedColor,
Color emphasisColor)
Turns the given label into an emphasized label.
|
static void |
makeEmphasizedLabelsRecursively(Component comp)
Turns all labels in the container hierarchy of the given component into
emphasized labels.
|
static void |
paintGlossyBackground(Component comp,
Graphics g,
int w,
int h)
A utility method for filling a component with a glossy background.
|
protected MacComponentFactory()
public static MacComponentFactory getInstance()
public LayerContainer createLayerContainer(AbstractGanttChart gc, TreeTable table, IGanttChartModel model)
IComponentFactoryLayerContainer for the given Gantt chart and tree table
combination. The layer container can utilize the given Gantt chart model
to determine how many layers and spreadsheets it has to add to itself.createLayerContainer in interface IComponentFactorycreateLayerContainer in class DefaultComponentFactorygc - the owner Gantt chart of the layer containertable - the table to the left of the layer containermodel - the model represented by the layer containerpublic JComponent createLayerContainerCorner(LayerContainer lc, String corner)
IComponentFactorycreateLayerContainerCorner in interface IComponentFactorycreateLayerContainerCorner in class DefaultComponentFactorylc - the layer containercorner - the corner in which to place the component (UPPER_LEFT,
UPPER_RIGHT, LOWER_LEFT, LOWER_RIGHT)NavigationControlPanelpublic LayerContainerRowHeader createLayerContainerRowHeader(LayerContainer lc)
IComponentFactoryLayerContainerRowHeader that will be used for the
given layer container. Layer container row headers can be used for things
like the display of a scale for a resource capacity.createLayerContainerRowHeader in interface IComponentFactorycreateLayerContainerRowHeader in class DefaultComponentFactorylc - the layer container that uses the row header for things like
capacity scalespublic TreeTable createTreeTable(AbstractGanttChart gc, ITreeTableModel model)
IComponentFactoryTreeTable for the given Gantt chart. The table can use
the given model to populate itself with date.createTreeTable in interface IComponentFactorycreateTreeTable in class DefaultComponentFactorygc - the owner Gantt chart / parent container of the tablemodel - the date source for the tablepublic Dateline createDateline(Timeline timeline)
IComponentFactoryDateline for the given Gantt chart and timeline.
The dateline will show times / dates for the given time zone and it will
allow the user to scroll across the given time span.createDateline in interface IComponentFactorycreateDateline in class DefaultComponentFactorytimeline - the parent timelineIComponentFactory.createTimeline(AbstractGanttChart),
IComponentFactory.createEventline(Timeline, Dateline)public Eventline createEventline(Timeline timeline, Dateline dateline)
IComponentFactoryEventline for the given Gantt chart and timeline.
The eventline will show global events and activities.createEventline in interface IComponentFactorycreateEventline in class DefaultComponentFactorytimeline - the parent timelinedateline - the dateline that is used in the same timelineIComponentFactory.createDateline(Timeline),
IComponentFactory.createTimeline(AbstractGanttChart)public TreeTableRowHeader createTreeTableRowHeader(TreeTable table)
IComponentFactoryTreeTableRowHeader that will be used for the given
tree table. Row headers display toggles for expanding/collapsing tree
nodes and also row numbers / outline numbers for each row.createTreeTableRowHeader in interface IComponentFactorycreateTreeTableRowHeader in class DefaultComponentFactorytable - the tree table that uses the row header for visualizing row
numberspublic TreeTableHeader createTreeTableHeader(AbstractGanttChart gc)
IComponentFactoryTreeTableHeader for the given Gantt chart. A Gantt
chart only uses a single column header even if it displays more than one
table at a time.createTreeTableHeader in interface IComponentFactorycreateTreeTableHeader in class DefaultComponentFactorygc - the owner Gantt chart of the headerAbstractGanttChart.getTreeTableHeader()public JComponent createTreeTableCorner(TreeTable table, String corner)
IComponentFactorycreateTreeTableCorner in interface IComponentFactorycreateTreeTableCorner in class DefaultComponentFactorytable - the table that is wrapped by the scrollpanecorner - the corner where the component will be placed (UPPER_LEFT,
UPPER_RIGHT, LOWER_LEFT, LOWER_RIGHT)TreeTableScrollPane,
JScrollPane.setCorner(String, java.awt.Component)public Timeline createTimeline(AbstractGanttChart gc)
IComponentFactoryTimeline for the given Gantt chart. The timeline
will forward the given time span and time zone to the dateline that it
will also create via the same component factory.createTimeline in interface IComponentFactorycreateTimeline in class DefaultComponentFactorygc - the owner Gantt chartIComponentFactory.createDateline(Timeline),
IComponentFactory.createEventline(Timeline, Dateline)public static void makeEmphasizedLabelsRecursively(Component comp)
comp - the root from where to startEmphasizedLabelUIpublic static JLabel createEmphasizedLabel(String text)
text - the text to use for the new labelEmphasizedLabelUIpublic static JLabel makeEmphasizedLabel(JLabel label)
label - the label to convertEmphasizedLabelUIpublic static JLabel makeEmphasizedLabel(JLabel label, Color focusedColor, Color unfocusedColor, Color emphasisColor)
label - the label to convertfocusedColor - the color to use when the label is in a focused windowunfocusedColor - the color to use when the label is in an unfocused windowemphasisColor - the second foreground color for emphasizing the labelpublic LayerContainerScrollPane createLayerContainerScrollPane(LayerContainer lc, LayerContainerRowHeader rowHeader, Timeline timeline, boolean primary)
IComponentFactorycreateLayerContainerScrollPane in interface IComponentFactorycreateLayerContainerScrollPane in class DefaultComponentFactorylc - the "view" of the scrollpanerowHeader - the row header component (e.g. for showing capacity numbers)timeline - the timeline component shown above the viewprimary - a flag used to signal the top-most layer containerpublic TreeTableScrollPane createTreeTableScrollPane(TreeTable table, TreeTableRowHeader rowHeader, TreeTableHeader header, boolean primary)
IComponentFactorycreateTreeTableScrollPane in interface IComponentFactorycreateTreeTableScrollPane in class DefaultComponentFactorytable - the "view" of the scrollpanerowHeader - the row header component (e.g. for showing row numbers)header - the tree table header (column names)primary - flag used for the top-most tree tablepublic JSplitPane createSplitPane()
IComponentFactorycreateSplitPane in interface IComponentFactorycreateSplitPane in class DefaultComponentFactorypublic static void paintGlossyBackground(Component comp, Graphics g, int w, int h)
comp - the component to fillg - the graphics context into which to draww - the width used for fillingh - the height used for fillingCopyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.