net.sf.latexdraw.ui
Class ToolbarBuilder

java.lang.Object
  extended by org.malai.ui.UIComposer<MToolBar>
      extended by net.sf.latexdraw.ui.ToolbarBuilder

public class ToolbarBuilder
extends UIComposer<MToolBar>

The composer that creates the 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 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

Version:
3.0
Author:
Arnaud BLOUIN

Field Summary
protected  WidgetMiniToolbar bezierListB
          The toolbar that contains the widgets to create curve-like shapes.
protected  WidgetMiniToolbar drawingB
          The toolbar that contains the widgets to customise the drawing's properties.
protected  WidgetMiniToolbar ellipseListB
          The toolbar that contains the widgets to create ellipse-like shapes.
protected  LFrame frame
          The main frame of the interactive system.
protected  WidgetMiniToolbar gridListB
          The toolbar that contains the widgets to create grid-like shapes.
protected  WidgetMiniToolbar magneticGridB
          The toolbar that contains the widgets to customise the magnetic grid.
protected  java.util.Map<java.awt.Component,WidgetMiniToolbar> mapContainers
          The hash map used to map a widget to its container.
protected  WidgetMiniToolbar polygonListB
          The toolbar that contains the widgets to create polygon-like shapes.
protected  WidgetMiniToolbar recListB
          The toolbar that contains the widgets to create rectangle-like shapes.
 
Fields inherited from class org.malai.ui.UIComposer
widget
 
Constructor Summary
ToolbarBuilder(LFrame frame)
          Creates the toolbar of the interactive system.
 
Method Summary
 void compose(MProgressBar progressBar)
          This method composes the user interface using instruments, presentations and widgets of the interactive system.
protected  void composeCurveLikeToolbar(LCanvas canvas)
          Adds a widgets to create bezier curve shapes.
protected  void composeDrawingPropertiesToolbar(LCanvas canvas)
           
protected  void composeEllipseLikeToolbar(LCanvas canvas)
          Adds a widgets to create ellipse/circle shapes.
protected  void composeGridLikeToolbar(LCanvas canvas)
          Adds a widgets to create grid/axes shapes.
protected  void composeMagneticGridToolbar(LCanvas canvas)
           
protected  void composePolygonLikeToolbar(LCanvas canvas)
          Adds a widgets to create polygon/rhombus/triangle shapes.
protected  void composeRectangleLikeToolbar(LCanvas canvas)
          Adds widgets to select the type of shape to create.
 
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

frame

protected LFrame frame
The main frame of the interactive system.


recListB

protected WidgetMiniToolbar recListB
The toolbar that contains the widgets to create rectangle-like shapes.


polygonListB

protected WidgetMiniToolbar polygonListB
The toolbar that contains the widgets to create polygon-like shapes.


gridListB

protected WidgetMiniToolbar gridListB
The toolbar that contains the widgets to create grid-like shapes.


ellipseListB

protected WidgetMiniToolbar ellipseListB
The toolbar that contains the widgets to create ellipse-like shapes.


bezierListB

protected WidgetMiniToolbar bezierListB
The toolbar that contains the widgets to create curve-like shapes.


magneticGridB

protected WidgetMiniToolbar magneticGridB
The toolbar that contains the widgets to customise the magnetic grid.


drawingB

protected WidgetMiniToolbar drawingB
The toolbar that contains the widgets to customise the drawing's properties.


mapContainers

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

Constructor Detail

ToolbarBuilder

public ToolbarBuilder(LFrame frame)
Creates the toolbar of the interactive system.

Parameters:
frame - The main frame of the interactive system.
Throws:
java.lang.NullPointerException - If frame 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<MToolBar>
Parameters:
progressBar - The progress bar that can be used to show the progress of the UI composition. Can be null.

composeDrawingPropertiesToolbar

protected void composeDrawingPropertiesToolbar(LCanvas canvas)

composeRectangleLikeToolbar

protected void composeRectangleLikeToolbar(LCanvas canvas)
Adds widgets to select the type of shape to create. Here rectangle/square shape.

Since:
3.0

composeEllipseLikeToolbar

protected void composeEllipseLikeToolbar(LCanvas canvas)
Adds a widgets to create ellipse/circle shapes.

Since:
3.0

composePolygonLikeToolbar

protected void composePolygonLikeToolbar(LCanvas canvas)
Adds a widgets to create polygon/rhombus/triangle shapes.

Since:
3.0

composeCurveLikeToolbar

protected void composeCurveLikeToolbar(LCanvas canvas)
Adds a widgets to create bezier curve shapes.

Since:
3.0

composeGridLikeToolbar

protected void composeGridLikeToolbar(LCanvas canvas)
Adds a widgets to create grid/axes shapes.

Since:
3.0

composeMagneticGridToolbar

protected void composeMagneticGridToolbar(LCanvas canvas)