Ticket #2042 (closed bug: worksforme)
Stickies cannot be resized.
Reported by: | deni | Owned by: | deni |
---|---|---|---|
Priority: | major | Milestone: | M12_RELEASE |
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: | deni | Design_owners: | deni |
Imp._owners: | deni | Test_owners: | |
Analysis_reviewers: | Changelog: | ||
Design_reviewers: | pap | Imp._reviewers: | pap |
Test_reviewers: | vanya | Analysis_score: | 0 |
Design_score: | 3 | Imp._score: | 4 |
Test_score: | 0 |
Description
Currently stickies cannot be resized and if their content is bigger than their size, it is clipped and there is no way to see it.
Therefore users should be able to resize stickies by dragging their bounds (like frames).
In addition, stickies should have a title bar (like frames), that can be used to move them and optionally that displays their title.
Change History
comment:2 Changed 16 years ago by deni
- Status changed from s1b_analysis_finished to s2a_design_started
comment:4 Changed 16 years ago by deni
- Status changed from s2a_design_started to s2b_design_finished
- Adding sticky size in the model:
- A new interface for elements that have their own size and that can be resized will be created in org.sophie2.base.model.book.interfaces package - Resizable.
- FrameR4 and StickyR4 will implement it.
- The default size of a new element will be (280, 210), as the default size of a frame.
- In order to keep the default size of a sticky, it will be set in StickyH.create(...)
- Adding title bar for stickies
- A new class StickyTitleBarHalo should be created in org.sophie2.extra.func.annotations.view.halos
- In order to reuse many of the properties and methods of MainTitleBarHalo, they will be moved to a superclass TitleBarHalo.
- The most important of them are:
- Prop<? extends JComponent> swingComponent()
- Prop<MouseListener> mouseListener()
- RwProp<ImmColor> color() - TODO: check whether it is not obsolete because the color is set by skins
- Prop<PageWorkArea> workArea()
- MouseCapture captureClick(MouseEvent e) will be made abstract
- public String getSkinId() will return the skin id of this element, it will be set as name of the swing component and used in the xml file of the skin
- The most important of them are:
- In order to reuse the properties and methods of MainHaloMenu connected with managing the layout of the title bar in StickyHaloMenu, they will be moved to a superclass HaloMenuWithTitleBar (in org.sophie2.main.app.halos.shared)
- Its menu position will be MenuPosition.TOP
- Prop<TitleBarHalo> titleBar() with own annotation hold the title bar halo
- Override addSwingComponents(List<JComponent> res) to add the title bar if it is visible.
- Prop<Void> titleBarSync() manages the layout of the title bar.
- Sticky halo menu:
- will extend HaloMenuWithTitleBar
- will no longer override computeLocation()
- the stickyView property will contain the single selected sticky view
- Resizing stickies
- In order to reuse some of the properties and methods of FrameView.ResizeAreaElement, they will be moved to a superclass ResizaAreaSceneElement in org.sophie2.main.app.commons.element
- Prop<Position> position()
- public abstract Prop<ImmRect> innerRect() - the inner bounds of the resize area
- public abstract Prop<ImmRect> outerRect() - the outer bounds of the resize area
- protected void setupDynamic() will compute the resize area's shape by the given outer and inner bounds and set its filling to transparent color
- Subclasses will have to provide inner and outer bounds and set the event source.
- An inner class ResizeAreaElement will be added in StickyView.
- The outer rect will be the bounds of the sticky.
- The inner rect will be a rectangle that is 2px distant from the outer rect.
- 8 resize areas will be added in setupSceneElements(...)
- The operation for resizing frames will be changed to resize stickies as well, and moved from FrameLogic to ElementLogic in org.sophie2.main.app.commons.element.
- In order to reuse some of the properties and methods of FrameView.ResizeAreaElement, they will be moved to a superclass ResizaAreaSceneElement in org.sophie2.main.app.commons.element
comment:6 Changed 16 years ago by deni
- Owner set to deni
- Status changed from s2c_design_ok to s3a_implementation_started
comment:7 Changed 16 years ago by deni
- Status changed from s3a_implementation_started to s3b_implementation_finished
comment:8 Changed 16 years ago by pap
- Status changed from s3b_implementation_finished to s3c_implementation_ok
- Design_score changed from 0 to 3
- Design_reviewers set to pap
- Imp._score changed from 0 to 4
- Imp._reviewers set to pap
- Commited to trunk in [6998]
- The end result is good but as I said:
- First you duplicated all the resizing areas code for stickies and I suppose you could make one scene element to contain all 8 areas an just make its subclasses
- It would be nice to give the user some notion of the resize areas such as tooltips and/or different color when the mouse is over them
Note: See
TracTickets for help on using
tickets.