CaCO3

CaCO3 is our ActionScript 2 library to draw 2D primitives like circles and rectangles.

CaCO3.png: 280x220, 8k (February 28, 2010, at 05:33 PM)CaCO3 drawings

Currently all widgets of the WebPlayer 2.5 GUI are drawn by CaCO3 and are positioned absolutely by a lot of source code. This bloats up the code and makes it hard to maintenance and to extend the functionality. To get rid of this situation CaCO3 will be extended to a lightweight widget toolkit which provides some powerful tools like layout managers.

The CaCO3 code will be split into four parts:

  • The drawing part
  • The theming part
  • The widgets part
  • The layout part

List of needed widgets:

  • Button
  • Button Group (or a more generic container)
  • Slider
  • Label
  • Layout Manager

Class Hierarchy

We looked over some GUI frameworks. Especially over the SWT and Windows Forms framework. We liked the SWT architecture more than the Windows Forms architecture. That's why our class hierarchy is similar to the SWT's one.

  • Widget
    • Button
    • Label
    • Scale
    • Composite
      • Shell
  • Layout
    • GridLayout
    • FillLayout
    • RowLayout

Show Windows Forms hierarchy (C#)

http://msdn.microsoft.com/en-us/library/system.windows.forms.aspx

  • Control
    • ScrollableControl
      • Panel
        • TableLayoutPanel
        • FlowLayoutPanel
        • SplitterPanel
    • ButtonBase
      • Button
      • CheckBox
      • RadioButton
    • Label
      • LinkLabel
    • TrackBar

Show SWT hierarchy (Java)

http://help.eclipse.org/galileo/index.jsp
http://www.ralfebert.de/rcpbuch/swt1/widget_hierarchy.png

  • Widget
    • Control
      • Button
      • Label
      • Scale
      • Scrollable
        • Composite
          • ...
            • Shell
  • Layout
    • GridLayout
    • FillLayout
    • FormLayout

Class Descriptions

Every functional part of the CaCO3 library has its own namespace/package.

org.webminster.caco3.graphics Package

This package contains all the current CaCO3 classes. These classes can be used to draw 2D primitives.

org.webminster.caco3.theming Package

To be defined!

org.webminster.caco3.widgets Package

The classes of this package store general information of the specific widget, but no drawing code. The constructor of all classes, except the shell widget which is the root widget, get the reference of its parent widget. The parent widget must be a composite or a shell widget.

Widget

FontSize('0.846', $m[1])
Abstract, base of all widgets, contains a list of its children.

Button

FontSize('0.846', $m[1])
Some kind of push button.

Label

FontSize('0.846', $m[1])
Just Text.

Scale

FontSize('0.846', $m[1])
Is needed for the seeking bar.

Composite

FontSize('0.846', $m[1])
Can contain other widgets and arranges them depending on the used layout manager.

Shell

FontSize('0.846', $m[1])
Manages/abstracts the size of the flash stage, the only widget which has no parent.

org.webminster.caco3.layout Package

Layout

FontSize('0.846', $m[1])
Abstract, base of all layouts.

GridLayout

FontSize('0.846', $m[1])

FillLayout

FontSize('0.846', $m[1])

RowLayout

FontSize('0.846', $m[1])