Bug 231086 - ExpandBar missing
Summary: ExpandBar missing
Status: CLOSED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.0   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: 1.2 M2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: plan-version=1.2 plan-theme=extend-r...
Keywords: contributed, plan
Depends on:
Blocks:
 
Reported: 2008-05-08 05:50 EDT by Rüdiger Herrmann CLA
Modified: 2009-01-28 11:17 EST (History)
3 users (show)

See Also:


Attachments
First version of the ExpandBar widget (67.53 KB, patch)
2008-05-09 09:14 EDT, Ivan Furnadjiev CLA
no flags Details | Diff
ExpandBar is added to the Control Demo. Some bugfixes. (74.71 KB, patch)
2008-05-13 11:42 EDT, Ivan Furnadjiev CLA
no flags Details | Diff
Chevron images (819 bytes, application/x-zip-compressed)
2008-05-14 08:37 EDT, Ivan Furnadjiev CLA
no flags Details
Control demo is updated. JUnit tests added. Some bugfixes. (112.21 KB, patch)
2008-05-16 11:17 EDT, Ivan Furnadjiev CLA
no flags Details | Diff
Updated computeSize and item layout calculation. (113.10 KB, patch)
2008-06-29 09:58 EDT, Ivan Furnadjiev CLA
no flags Details | Diff
Patch without the binary data (images). (106.56 KB, patch)
2008-07-09 06:58 EDT, Ivan Furnadjiev CLA
no flags Details | Diff
Sync the patch with CVS HEAD. (108.38 KB, patch)
2008-07-16 05:23 EDT, Ivan Furnadjiev CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rüdiger Herrmann CLA 2008-05-08 05:50:05 EDT
The counterpart for org.eclipse.swt.widgets.ExpandBar is missing in RWT
Comment 1 Ivan Furnadjiev CLA 2008-05-09 09:14:18 EDT
Created attachment 99453 [details]
First version of the ExpandBar widget
Comment 2 Ivan Furnadjiev CLA 2008-05-13 11:42:58 EDT
Created attachment 99969 [details]
ExpandBar is added to the Control Demo. Some bugfixes.
Comment 3 Frank Appel CLA 2008-05-14 06:03:14 EDT
Comments on expandbar patch:

1) We have to adjust since tags in the final version
  (depending on the release Version, probably 1.2)

2) Coding Conventions:
  (Remember by reading this that I didn't check which
   parts are original SWT ExpandBar code...)
  
  ExpandAdapter: final before method parameters is missing sometimes,
                 spaces in parameter list is missing
  ExpandBar: missing parenthesis in if-control structure with single statement,
             final before method parameters is missing sometimes,
             we don't use return statements to end method execution,
             we don't use break to end while loops
  ExpandItem: final before method parameters is missing sometimes,
              we don't use single character local variable names
              (exceptions to the latter rule are index names
              like i,j,k etc. and coordinats like x,y)
  
    Code like this:
      width = Math.max( getPreferredWidth(), parent.computeSize( SWT.DEFAULT,
                                                                 SWT.DEFAULT,
                                                                 false ).x
                                             - 2
                                             * parent.spacing
                                             - parent.v_scroll );
    would be more readable if written like:
    
      int parentWidth = parent.computeSize( SWT.DEFAULT, SWT.DEFAULT, false ).x;
      int availableWidth = parentWidth - 2 * parent.spacing - parent.v_scroll;
      width = Math.max( getPreferredWidth(), availableWidth );
    
    Maybe the variable names are not fitting, I just wanted to provide a sketch.
                   
  ExpandItemLCA:
    To match the character per line limitations code like this:
     
      (1)
      public static final String EVENT_ITEM_EXPANDED = "org.eclipse.swt.events.expandItemExpanded";
      (2)
      adapter.preserve( PROP_EXPANDED, Boolean.valueOf( expandItem.getExpanded() ) );
      (3)
      writer.set( PROP_HEADER_HEIGHT, "headerHeight", headerHeight, DEFAULT_HEADER_HEIGHT );

    can be formatted like:

      (1)
      public static final String EVENT_ITEM_EXPANDED
        = "org.eclipse.swt.events.expandItemExpanded";
      (2)
      adapter.preserve( PROP_EXPANDED,
                        Boolean.valueOf( expandItem.getExpanded() ) );
      (3)
      writer.set( PROP_HEADER_HEIGHT,
                  "headerHeight",
                  headerHeight,
                  DEFAULT_HEADER_HEIGHT );

3) TypedEvent (Rüdiger)
     EVENT_ORDER check whether this is ok 

4) ExpandItem (Rüdiger):
     readData: I don't think that the use of ProcessActionRunner should be
               necessary, as the ExpandEvent is part of the TypedEvents.
            
5) No TestCases - see Table_Test as an example
  
6) Demo: would be nice having buttons for adding and removing additional
         expandbar items
         
7) Image Problem: The image in the right upper corner of an item is not
                  displayed correctly - see attached PNG.
Comment 4 Ivan Furnadjiev CLA 2008-05-14 08:37:41 EDT
Created attachment 100159 [details]
Chevron images
Comment 5 Ivan Furnadjiev CLA 2008-05-16 11:17:12 EDT
Created attachment 100655 [details]
Control demo is updated. JUnit tests added. Some bugfixes.
Comment 6 Ivan Furnadjiev CLA 2008-06-29 09:58:37 EDT
Created attachment 106076 [details]
Updated computeSize and item layout calculation.
Comment 7 Ivan Furnadjiev CLA 2008-07-09 06:58:42 EDT
Created attachment 106937 [details]
 Patch without the binary data (images).

Patch without the binary data (images).

The binary data (images) are removed from the patch.
Put the images from the zip in:
org.eclipse.rap.rwt.q07\js\resource\widget\rap\expanditem
and
org.eclipse.rap.rwt.test.mockup\js\resource\widget\rap\expanditem
Comment 8 Ivan Furnadjiev CLA 2008-07-16 05:23:36 EDT
Created attachment 107580 [details]
 Sync the patch with CVS HEAD.

Put the images from the zip in:
org.eclipse.rap.rwt.q07\js\resource\widget\rap\expanditem
and
org.eclipse.rap.rwt.test.mockup\js\resource\widget\rap\expanditem
Comment 9 Ivan Furnadjiev CLA 2008-09-11 15:38:42 EDT
ExpandBar added to CVS HEAD.
Comment 10 Ivan Furnadjiev CLA 2008-09-11 15:40:28 EDT
ExpandBar commited. Close the bug.