net.sf.latexdraw.ui
Class PropertiesToolbarBuilder

java.lang.Object
  extended by org.malai.ui.UIComposer<MPanel>
      extended by net.sf.latexdraw.ui.PropertiesToolbarBuilder

public class PropertiesToolbarBuilder
extends UIComposer<MPanel>

The composer that creates the properties tool bar of the application.

This file is part of LaTeXDraw.
Copyright (c) 2005-2012 Arnaud BLOUIN

LaTeXDraw is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
LaTeXDraw is distributed without any warranty; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

12/08/11

Since:
3.0
Author:
Arnaud BLOUIN

Field Summary
protected  LFrame frame
          The main frame of the application.
protected static int HEIGHT_TEXTFIELD
          The max height of the textfield widget.
protected  java.util.Map<java.awt.Component,WidgetMiniToolbar> mapContainers
          The hash map used to map a widget to its container.
protected static int SEPARATION_WIDTH
          The space added between widgets.
 
Fields inherited from class org.malai.ui.UIComposer
widget
 
Constructor Summary
PropertiesToolbarBuilder(LFrame frame)
          Creates the bottom panel that contains a set of widgets to modify shapes.
 
Method Summary
protected  void addSpinner(java.awt.Container cont, MSpinner spinner, boolean label, int width)
           
 void compose(MProgressBar progressBar)
          This method composes the user interface using instruments, presentations and widgets of the interactive system.
protected  javax.swing.JComponent composeArcPropertiesWidgets(ShapeArcCustomiser ins, LCanvas canvas)
           
protected  javax.swing.JComponent composeArrowToolbar(ShapeArrowCustomiser ins, LCanvas canvas)
           
protected  WidgetMiniToolbar composeAxesPropertiesToolbar(ShapeAxesCustomiser cust, LCanvas canvas)
          Creates the toolbar containing the widgets that customises axes.
protected  javax.swing.JComponent composeBorderPropertiesPanel(ShapeBorderCustomiser borderCustomiser, LCanvas canvas)
          Creates the widget that contains the widgets dedicated to the modification of shapes border properties.
protected  WidgetMiniToolbar composeDimPosPropertiesToolbar(ShapeCoordDimCustomiser cust, LCanvas canvas)
           
protected  javax.swing.JComponent composeDotToolbar(ShapeDotCustomiser ins, LCanvas canvas)
           
protected  javax.swing.JComponent composeDoubleBorderPropertiesPanel(ShapeDoubleBorderCustomiser dbleBorderCustomiser, LCanvas canvas)
          Creates the widget that contains the widgets dedicated to the modification of shapes double border properties.
protected  javax.swing.JComponent composeFillingPanel(ShapeFillingCustomiser fillingCustomiser, LCanvas canvas)
          Creates the widget that contains the widgets dedicated to the modification of shapes filling properties.
protected  WidgetMiniToolbar composeGridLabelsPropertiesToolbar(ShapeAxesCustomiser axeCust, ShapeGridCustomiser stdGridCust, LCanvas canvas)
          Creates the toolbar containing the widgets that customises grids' labels.
protected  WidgetMiniToolbar composeGridPropertiesToolbar(ShapeGridCustomiser cust, LCanvas canvas)
           
protected  void composeJoinShapesWidgets(ShapeGrouper grouper)
           
protected  javax.swing.JComponent composeRotationToolbar(ShapeRotationCustomiser ins, LCanvas canvas)
           
protected  javax.swing.JComponent composeShadowPropertiesPanel(ShapeShadowCustomiser shadowCustomiser, LCanvas canvas)
          Creates the widget that contains the widgets dedicated to the modification of shapes double border properties.
protected  WidgetMiniToolbar composeTextPositionToolbar(TextCustomiser textCustomiser, LCanvas canvas)
           
protected  WidgetMiniToolbar composeTextPropertiesToolbar(TextCustomiser textCustomiser, LCanvas canvas)
           
 
Methods inherited from class org.malai.ui.UIComposer
getWidget, setWidgetVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HEIGHT_TEXTFIELD

protected static final int HEIGHT_TEXTFIELD
The max height of the textfield widget.

See Also:
Constant Field Values

SEPARATION_WIDTH

protected static final int SEPARATION_WIDTH
The space added between widgets.

See Also:
Constant Field Values

frame

protected LFrame frame
The main frame of the application.


mapContainers

protected java.util.Map<java.awt.Component,WidgetMiniToolbar> mapContainers
The hash map used to map a widget to its container.

Constructor Detail

PropertiesToolbarBuilder

public PropertiesToolbarBuilder(LFrame frame)
Creates the bottom panel that contains a set of widgets to modify shapes.

Parameters:
frame - The frame that will contains the tool bar.
Throws:
java.lang.IllegalArgumentException - If the given instrument is null.
Since:
3.0
Method Detail

compose

public void compose(MProgressBar progressBar)
Description copied from class: UIComposer
This method composes the user interface using instruments, presentations and widgets of the interactive system.

Specified by:
compose in class UIComposer<MPanel>
Parameters:
progressBar - The progress bar that can be used to show the progress of the UI composition. Can be null.

composeJoinShapesWidgets

protected void composeJoinShapesWidgets(ShapeGrouper grouper)

composeGridLabelsPropertiesToolbar

protected WidgetMiniToolbar composeGridLabelsPropertiesToolbar(ShapeAxesCustomiser axeCust,
                                                               ShapeGridCustomiser stdGridCust,
                                                               LCanvas canvas)
Creates the toolbar containing the widgets that customises grids' labels.


composeAxesPropertiesToolbar

protected WidgetMiniToolbar composeAxesPropertiesToolbar(ShapeAxesCustomiser cust,
                                                         LCanvas canvas)
Creates the toolbar containing the widgets that customises axes.


composeGridPropertiesToolbar

protected WidgetMiniToolbar composeGridPropertiesToolbar(ShapeGridCustomiser cust,
                                                         LCanvas canvas)

composeDimPosPropertiesToolbar

protected WidgetMiniToolbar composeDimPosPropertiesToolbar(ShapeCoordDimCustomiser cust,
                                                           LCanvas canvas)

composeTextPropertiesToolbar

protected WidgetMiniToolbar composeTextPropertiesToolbar(TextCustomiser textCustomiser,
                                                         LCanvas canvas)

composeTextPositionToolbar

protected WidgetMiniToolbar composeTextPositionToolbar(TextCustomiser textCustomiser,
                                                       LCanvas canvas)

addSpinner

protected void addSpinner(java.awt.Container cont,
                          MSpinner spinner,
                          boolean label,
                          int width)

composeArcPropertiesWidgets

protected javax.swing.JComponent composeArcPropertiesWidgets(ShapeArcCustomiser ins,
                                                             LCanvas canvas)

composeDotToolbar

protected javax.swing.JComponent composeDotToolbar(ShapeDotCustomiser ins,
                                                   LCanvas canvas)

composeArrowToolbar

protected javax.swing.JComponent composeArrowToolbar(ShapeArrowCustomiser ins,
                                                     LCanvas canvas)

composeRotationToolbar

protected javax.swing.JComponent composeRotationToolbar(ShapeRotationCustomiser ins,
                                                        LCanvas canvas)

composeFillingPanel

protected javax.swing.JComponent composeFillingPanel(ShapeFillingCustomiser fillingCustomiser,
                                                     LCanvas canvas)
Creates the widget that contains the widgets dedicated to the modification of shapes filling properties.

Parameters:
fillingCustomiser - The instrument that contains the widgets.
Returns:
The created widget. Cannot be null.
Since:
3.0

composeShadowPropertiesPanel

protected javax.swing.JComponent composeShadowPropertiesPanel(ShapeShadowCustomiser shadowCustomiser,
                                                              LCanvas canvas)
Creates the widget that contains the widgets dedicated to the modification of shapes double border properties.

Parameters:
shadowCustomiser - The instrument that contains the widgets.
Returns:
The created widget. Cannot be null.
Since:
3.0

composeDoubleBorderPropertiesPanel

protected javax.swing.JComponent composeDoubleBorderPropertiesPanel(ShapeDoubleBorderCustomiser dbleBorderCustomiser,
                                                                    LCanvas canvas)
Creates the widget that contains the widgets dedicated to the modification of shapes double border properties.

Parameters:
dbleBorderCustomiser - The instrument that contains the widgets.
Returns:
The created widget. Cannot be null.
Since:
3.0

composeBorderPropertiesPanel

protected javax.swing.JComponent composeBorderPropertiesPanel(ShapeBorderCustomiser borderCustomiser,
                                                              LCanvas canvas)
Creates the widget that contains the widgets dedicated to the modification of shapes border properties.

Parameters:
borderCustomiser - The instrument that contains the widgets.
Returns:
The created widget. Cannot be null.
Since:
3.0