Ticket #2372 (closed feature: obsolete)

Opened 10 years ago

Last modified 8 years ago

book-panel-scroller -- Create panel scroller

Reported by: deyan Owned by: tanya
Priority: major Milestone: X3
Component: uncategorized Version: 2.0
Keywords: Cc:
Category: unknown Effort:
Importance: Ticket_group:
Estimated Number of Hours: 0 Add Hours to Ticket: 0
Billable?: yes Total Hours: 0
Analysis_owners: deyan, deyan Design_owners: tanya
Imp._owners: Test_owners:
Analysis_reviewers: tanya Changelog: Changelog
Design_reviewers: meddle, meddle Imp._reviewers: meddle, deyan
Test_reviewers: Analysis_score: 3
Design_score: 4 Imp._score: 4
Test_score: 0

Description (last modified by deyan) (diff)

Scroller consists of 3 parts, main, left(up) arrow and right (down) arrow

  • Main part is always visible and active
  • Left and right parts are visible only on need (there is not reserved space for them, they take place when needed)
  • Left and right parts (arrows) are visible together
  • Left and right parts (arrows) support active and inactive states.
    • An arrow is active when needed
  • Left and right parts (buttons) should be as tall as the middle part
  • Clicking on a button scrolls the area as it was a scrollbar button.
  • (optional) Create a scroller for the book panel.
  • (optional) Forbid scrollbar appearence.

Attachments

scrollable.patch (14.4 KB) - added by tanya 9 years ago.
panelScroller.patch (30.2 KB) - added by tanya 9 years ago.
scrollable.2.patch (31.1 KB) - added by tanya 9 years ago.

Change History

comment:1 Changed 10 years ago by deyan

  • Status changed from new to s1b_analysis_finished

comment:2 Changed 9 years ago by tanya

  • Status changed from s1b_analysis_finished to s2a_design_started

comment:3 Changed 9 years ago by tanya

  • To create a CustomScrollPane you need to call the constructor with 1 parameter "orientation" which could be CustomScrollPane.VERTICAL or CustomScrollPane.HORIZONTAL. Actually, the constants are created to facilitate the person who is going to create CustomScrollPane. Orientation is a boolean parameter as CustomScrollPane.HORIZONTAL corresponds to TRUE and CustomScrollPane.VERTICAL corresponds to FALSE.
  • CustomScrollPane has two buttons - for forward scrolling and for backward scrolling.
  • CustomScrollPane has a scrollable part that can be added with setViewportView(JComponent comp). comp is the part that will be scrollable.
  • CustomScrollPane.HORIZONTAL defines that the three components of the CustomScrollPane are positioned from left to right - backward button, scrollable part, forward button. CustomScrollPane.VERTICAL defines that the three components of the CustomScrollPane are positioned from up to down - backward button, scrollable part, forward button.
  • CustomScrollPane has two buttons - forward and backward, for each of them action listener is set. On click, tryForward() and tryBackward() methods are called. CustomScrollPane has viewport and viewportView. ViewportView is the component that will be scrollable. Viewport is a panel which is a part of the CustomScrollPane and it is the component that will show the viewportView. ViewportView is a component that is positioned on a specific location within the the viewport. With changing the location scrolling of the viewportView is simulated. On tryForward() and tryBackward() the position of the viewportView within the viewport is changed.
  • ScrollPaneLayout is created. This is the layout manager of the CustomScrollPane. It is created for the need of ScrollPaneLayout. minimumLayoutSize is defined to return a dimension with width = the width of forward button + the width of backward button and height = the height of forward button + the height of backward button. layoutContainer requires the container that is to be laid out to have 3 components - backward, forward, center and center to have one component that will be the scrollable component.

Changed 9 years ago by tanya

comment:4 Changed 9 years ago by tanya

  • Status changed from s2a_design_started to s2b_design_finished

comment:5 Changed 9 years ago by tanya

  • Design_owners set to tanya

comment:6 Changed 9 years ago by meddle

  • Status changed from s2b_design_finished to s1c_analysis_ok
  • Design_score changed from 0 to 2
  • Design_reviewers set to meddle
  • Don't use such expressions as public static final boolean HORIZONTAL = Boolean.TRUE, instead use the simple types => public static final boolean HORIZONTAL = true.
  • We don't know if this is only for design testing, but the buttons which you use in your CustomScrollPane, should be iconified somehow.
    • For the horizontal orientation
    • For the vertical orientation
    • I don't know if Dido will provide them to you or you will use these from the look and feel, but take that in mind.
  • Don't use @SuppressWarnings("all") even in design related, code, it is easy to be forgotten.
  • I prefer the code to be documented and formed with our standards in mind at the design phase, because it is easier to be read and understand.
  • Don't like local variables to have one-letter names like 'd' for Dimesion for example. It is clear that 'ddd' is bad one too. And 'sss'???
  • 'ScrollPaneLayout is created. This is the layout manager of the CustomScrollPane. It is created for the need of ScrollPaneLayout' -> Read this and you will see what is indirect cyclic recursion :)
  • From the analysis:
    • You didn't explain how you will achieve that -> 'Left and right parts are visible only on need (there is not reserved space for them, they take place when needed)'
    • 'Left and right parts (buttons) should be as tall as the middle part' -> Hmm from what I understood, the left and right parts, are these that determine the size in your implementation...
    • 'Create a scroller for the book panel' -> This scroller is not mentioned in the design at all.
    • 'Forbid scrollbar appearence' -> And this?
  • You should review the analysis before taking the task (mark it, comment it) and that way, you will know for sure what the Experience people want.
    • Review it before the next Design review, please.

2p

comment:7 Changed 9 years ago by tanya

  • Status changed from s1c_analysis_ok to new
  • The goal of this task is DEMO!

comment:8 Changed 9 years ago by deyan

  • Type changed from bug to feature
  • Description modified (diff)
  • Analysis_owners changed from deyan to deyan, deyan

comment:9 Changed 9 years ago by deyan

  • Owner set to deyan
  • Status changed from new to s1a_analysis_started

comment:10 Changed 9 years ago by deyan

  • Status changed from s1a_analysis_started to s1b_analysis_finished

comment:11 Changed 9 years ago by tanya

  • Status changed from s1b_analysis_finished to s1c_analysis_ok
  • Analysis_reviewers set to tanya
  • Analysis_score changed from 0 to 3
  • Do not understand what "Forbid scrollbar appearence" means.
  • Analysis should require creation of icons if you want the left and right buttons to be skinned. Icons are not mention so the result will be without skinned left and right buttons.
  • If the icons for the buttons are smaller than the icons for the components in the scrollable part, then it will not be possible left and right parts to be as tall as the middle part. However, all three component will be in one panel, so practically the three components will be equally high.

comment:12 Changed 9 years ago by tanya

  • Owner changed from deyan to tanya
  • Status changed from s1c_analysis_ok to s2a_design_started

comment:13 Changed 9 years ago by tanya

  • Status changed from s2a_design_started to s2b_design_finished
  • CustomScrollPane and ScrollPaneLayout classes are created in module - org.sophie2.base.commons, in org.sophie2.base.commons.gui package.
  • HorizontalJScrollPaneDemo and VerticalJScrollPaneDemo in the same module - org.sophie2.base.commons.
  • To create a CustomScrollPane you need to call the constructor with 1 parameter "orientation" which could be CustomScrollPane.VERTICAL or CustomScrollPane.HORIZONTAL. Actually, the constants are created to facilitate the person who is going to create CustomScrollPane. Orientation is a boolean parameter as CustomScrollPane.HORIZONTAL corresponds to TRUE and CustomScrollPane.VERTICAL corresponds to FALSE.
  • CustomScrollPane has two buttons - for forward scrolling and for backward scrolling.
  • CustomScrollPane has a scrollable part that can be added with setViewportView(JComponent comp). comp is the part that will be scrollable.
  • CustomScrollPane.HORIZONTAL defines that the three components of the CustomScrollPane are positioned from left to right - backward button, scrollable part, forward button. CustomScrollPane.VERTICAL defines that the three components of the CustomScrollPane are positioned from up to down - backward button, scrollable part, forward button.
  • CustomScrollPane has two buttons - forward and backward, for each of them action listener is set. On click, tryForward() and tryBackward() methods are called. CustomScrollPane has viewport and viewportView. ViewportView is the component that will be scrollable. Viewport is a panel which is a part of the CustomScrollPane and it is the component that will show the viewportView. ViewportView is a component that is positioned on a specific location within the the viewport. With changing the location scrolling of the viewportView is simulated. On tryForward() and tryBackward() the position of the viewportView within the viewport is changed.
  • ScrollPaneLayout is created. This is the layout manager of the CustomScrollPane. minimumLayoutSize is defined to return a dimension with width = the width of forward button + the width of backward button and height = the height of forward button + the height of backward button. layoutContainer requires the container that is to be laid out to have 3 components - backward, forward, center and center to have one component that will be the scrollable component.
  • layoutContainer method will be responsible for whether or not the forward and backward buttons should be visible or not. layoutContainer method will be responsible for whether or not the backward and forward buttons should be enabled.

Changed 9 years ago by tanya

comment:14 Changed 9 years ago by meddle

  • Status changed from s2b_design_finished to s2c_design_ok
  • Design_score changed from 2 to 4
  • Design_reviewers changed from meddle to meddle, meddle
  • Default values should be in constants. I'm talking about :
             private int step = 5; 
             private int delay = 100; 
             private int translation = 0; 
    
  • You don't have icons for the buttons, but may be the button's text should be defined by the expirience team, so talk with them for that.
  • For the height of the buttons... Should be height as the scrollable view. So that is important at the implementation phase.

comment:15 Changed 9 years ago by meddle

  • Put skin prop ids for the buttons.

comment:16 Changed 9 years ago by tanya

  • Status changed from s2c_design_ok to s3a_implementation_started

Changed 9 years ago by tanya

comment:17 Changed 9 years ago by tanya

  • Status changed from s3a_implementation_started to s3b_implementation_finished
  • constants defined
  • names changed
  • height fixed


New patch is added.

comment:18 Changed 9 years ago by meddle

  • Status changed from s3b_implementation_finished to s3c_implementation_ok
  • Imp._score changed from 0 to 4
  • Imp._reviewers set to meddle, deyan

Merged into the trunk at [9020].

  • Good and detailed JavaDoc.
  • Good working implementation.
  • There are some questions:
    • If the scroll panel will be possible to be scrolled with the mouse wheel.
    • If the buttons can be rotated vertically on vertical scroll panels.

4p

comment:19 Changed 8 years ago by meddle

  • Status changed from s3c_implementation_ok to closed
  • Resolution set to obsolete

Closing all the tickets before M Y1

Note: See TracTickets for help on using tickets.