From b34029140ffc8670beb0b28a6710ee1d959edf6a Mon Sep 17 00:00:00 2001 From: Richard Alam Date: Mon, 30 Jul 2012 02:57:42 +0000 Subject: [PATCH] - extract out each button to maintain easily --- .../whiteboard/views/WhiteboardToolbar.mxml | 189 +++++++++--------- .../views/buttons/CircleButton.mxml | 22 ++ .../whiteboard/views/buttons/ClearButton.mxml | 19 ++ .../whiteboard/views/buttons/LineButton.mxml | 18 ++ .../views/buttons/PanZoomButton.mxml | 19 ++ .../views/buttons/RectangleButton.mxml | 20 ++ .../views/buttons/ScribbleButton.mxml | 21 ++ .../whiteboard/views/buttons/TextButton.mxml | 18 ++ .../views/buttons/TriangleButton.mxml | 19 ++ .../whiteboard/views/buttons/UndoButton.mxml | 18 ++ 10 files changed, 271 insertions(+), 92 deletions(-) create mode 100755 bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/CircleButton.mxml create mode 100755 bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/ClearButton.mxml create mode 100755 bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/LineButton.mxml create mode 100755 bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/PanZoomButton.mxml create mode 100755 bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/RectangleButton.mxml create mode 100755 bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/ScribbleButton.mxml create mode 100755 bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/TextButton.mxml create mode 100755 bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/TriangleButton.mxml create mode 100755 bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/UndoButton.mxml diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/WhiteboardToolbar.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/WhiteboardToolbar.mxml index a75444a3b7..922100a66f 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/WhiteboardToolbar.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/WhiteboardToolbar.mxml @@ -20,8 +20,12 @@ $Id: $ --> - @@ -113,28 +117,28 @@ switch(s) { case DrawObject.PENCIL: - btnPenc.selected = true; - btnEllipse.selected = false; - btnRectangle.selected = false; - btnText.selected = false; +// btnPenc.selected = true; +// btnEllipse.selected = false; +// btnRectangle.selected = false; +// btnText.selected = false; break; case DrawObject.ELLIPSE: - btnPenc.selected = false; - btnEllipse.selected = true; - btnRectangle.selected = false; - btnText.selected = false; +// btnPenc.selected = false; +// btnEllipse.selected = true; +// btnRectangle.selected = false; +// btnText.selected = false; break; case DrawObject.RECTANGLE: - btnPenc.selected = false; - btnEllipse.selected = false; - btnRectangle.selected = true; - btnText.selected = false; +// btnPenc.selected = false; +// btnEllipse.selected = false; +// btnRectangle.selected = true; +// btnText.selected = false; break; case DrawObject.TEXT: - btnPenc.selected = false; - btnEllipse.selected = false; - btnRectangle.selected = false; - btnText.selected = true; +// btnPenc.selected = false; +// btnEllipse.selected = false; +// btnRectangle.selected = false; +// btnText.selected = true; break; } } @@ -146,79 +150,79 @@ switch (toolType) { case DrawObject.PENCIL: - btnPenc.selected = true; - btnEllipse.selected = false; - btnRectangle.selected = false; - btnTriangle.selected = false; - btnLine.selected = false; - btnText.selected = false; +// btnPenc.selected = true; +// btnEllipse.selected = false; +// btnRectangle.selected = false; +// btnTriangle.selected = false; +// btnLine.selected = false; +// btnText.selected = false; break; case DrawObject.HIGHLIGHTER: - btnPenc.selected = false; - btnEllipse.selected = false; - btnRectangle.selected = false; - btnTriangle.selected = false; - btnLine.selected = false; - btnText.selected = false; +// btnPenc.selected = false; +// btnEllipse.selected = false; +// btnRectangle.selected = false; +// btnTriangle.selected = false; +// btnLine.selected = false; +// btnText.selected = false; break; case DrawObject.ELLIPSE: - btnPenc.selected = false; - btnEllipse.selected = true; - btnRectangle.selected = false; - btnTriangle.selected = false; - btnLine.selected = false; - btnText.selected = false; +// btnPenc.selected = false; +// btnEllipse.selected = true; +// btnRectangle.selected = false; +// btnTriangle.selected = false; +// btnLine.selected = false; +// btnText.selected = false; break; case DrawObject.RECTANGLE: - btnPenc.selected = false; - btnEllipse.selected = false; - btnRectangle.selected = true; - btnTriangle.selected = false; - btnLine.selected = false; - btnText.selected = false; +// btnPenc.selected = false; +// btnEllipse.selected = false; +// btnRectangle.selected = true; +// btnTriangle.selected = false; +// btnLine.selected = false; +// btnText.selected = false; break; case DrawObject.TRIANGLE: - btnPenc.selected = false; - btnEllipse.selected = false; - btnRectangle.selected = false; - btnTriangle.selected = true; - btnLine.selected = false; - btnText.selected = false; +// btnPenc.selected = false; +// btnEllipse.selected = false; +// btnRectangle.selected = false; +// btnTriangle.selected = true; +// btnLine.selected = false; +// btnText.selected = false; break; case DrawObject.LINE: - btnPenc.selected = false; - btnEllipse.selected = false; - btnRectangle.selected = false; - btnTriangle.selected = false; - btnLine.selected = true; - btnText.selected = false; +// btnPenc.selected = false; +// btnEllipse.selected = false; +// btnRectangle.selected = false; +// btnTriangle.selected = false; +// btnLine.selected = true; +// btnText.selected = false; break; case DrawObject.ERASER: - btnPenc.selected = false; - btnEllipse.selected = false; - btnRectangle.selected = false; - btnTriangle.selected = false; - btnLine.selected = false; - btnText.selected = false; +// btnPenc.selected = false; +// btnEllipse.selected = false; +// btnRectangle.selected = false; +// btnTriangle.selected = false; +// btnLine.selected = false; +// btnText.selected = false; break; } } else if (gType == WhiteboardConstants.TYPE_TEXT) { - btnPenc.selected = false; - btnEllipse.selected = false; - btnRectangle.selected = false; - btnTriangle.selected = false; - btnLine.selected = false; - btnText.selected = true; +// btnPenc.selected = false; +// btnEllipse.selected = false; +// btnRectangle.selected = false; +// btnTriangle.selected = false; +// btnLine.selected = false; +// btnText.selected = true; canvas.setGraphicType(gType); canvas.setTool(toolType); } else if (gType == WhiteboardConstants.TYPE_SELECTION) { switch(toolType) { case SelectObject.SELECT_TOOL: - btnPenc.selected = false; - btnEllipse.selected = false; - btnRectangle.selected = false; - btnLine.selected = false; - btnText.selected = false; +// btnPenc.selected = false; +// btnEllipse.selected = false; +// btnRectangle.selected = false; +// btnLine.selected = false; +// btnText.selected = false; break; } canvas.setGraphicType(gType); @@ -264,9 +268,7 @@ protected function toggleTransparency():void { canvas.toggleTransparency(); } - - - + private function presenterMode(e:MadePresenterEvent):void { canvas.makeTextObjectsEditable(e); } @@ -322,6 +324,10 @@ var gobj:GraphicObject = event.data; LogUtil.debug("!!!!DESELECTED:" + " " + gobj.getProperties()); } + + private function enabledWhiteboard():void { + dispatchEvent(new WhiteboardButtonEvent(WhiteboardButtonEvent.ENABLE_WHITEBOARD)); + } ]]> @@ -330,24 +336,20 @@ that identifies the "category" of the tool (ex. shape vs text), and the other specifies the tool itself (ex. line tool vs triangle tool, even though both are "shapes") --> - - - - - - - - + + + + + + + + - - - + + + - + - + - diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/CircleButton.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/CircleButton.mxml new file mode 100755 index 0000000000..0407bbbaba --- /dev/null +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/CircleButton.mxml @@ -0,0 +1,22 @@ + + + + + + diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/ClearButton.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/ClearButton.mxml new file mode 100755 index 0000000000..b2dcc987bf --- /dev/null +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/ClearButton.mxml @@ -0,0 +1,19 @@ + + + + + + diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/LineButton.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/LineButton.mxml new file mode 100755 index 0000000000..24bf102537 --- /dev/null +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/LineButton.mxml @@ -0,0 +1,18 @@ + + + + + + diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/PanZoomButton.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/PanZoomButton.mxml new file mode 100755 index 0000000000..a88dd7a771 --- /dev/null +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/PanZoomButton.mxml @@ -0,0 +1,19 @@ + + + + + + diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/RectangleButton.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/RectangleButton.mxml new file mode 100755 index 0000000000..922e88cc01 --- /dev/null +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/RectangleButton.mxml @@ -0,0 +1,20 @@ + + + + + + + diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/ScribbleButton.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/ScribbleButton.mxml new file mode 100755 index 0000000000..9877a9be5f --- /dev/null +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/ScribbleButton.mxml @@ -0,0 +1,21 @@ + + + + + + diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/TextButton.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/TextButton.mxml new file mode 100755 index 0000000000..f143618a6f --- /dev/null +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/TextButton.mxml @@ -0,0 +1,18 @@ + + + + + + diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/TriangleButton.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/TriangleButton.mxml new file mode 100755 index 0000000000..1b2df88ab1 --- /dev/null +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/TriangleButton.mxml @@ -0,0 +1,19 @@ + + + + + + diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/UndoButton.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/UndoButton.mxml new file mode 100755 index 0000000000..33c523a149 --- /dev/null +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/buttons/UndoButton.mxml @@ -0,0 +1,18 @@ + + + + + +