Ticket #2342 (closed feature: obsolete)
list-palette-icons -- list palettes should support icons
Reported by: | deyan | Owned by: | deni |
---|---|---|---|
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 | Design_owners: | deni |
Imp._owners: | deni | Test_owners: | |
Analysis_reviewers: | deni | Changelog: | Changelog |
Design_reviewers: | pap | Imp._reviewers: | meddle, todor, deyan |
Test_reviewers: | Analysis_score: | 4.5 | |
Design_score: | 3.5 | Imp._score: | 4 |
Test_score: | 0 |
Description
See Palettes
- List palettes should support icons + text (1)
- Icons should be with different sizes
- Text should be right of the icons
- All resources palette
- Should have specific icons for each supported resource type (by resource type it is meant audio, video, text, pdf, comment stream, script; it is OK to support icon for each filetype, but not nessesary)
- Default icons should be defined in corresponding module and should be skinnable as well
Optional requirements
- List palettes should support some padding (1)
- List palettes should have (complex) separators
- Separators should have title (1)
Attachments
Change History
comment:1 Changed 15 years ago by deyan
- Owner set to deyan
- Status changed from new to s1a_analysis_started
comment:2 Changed 15 years ago by deyan
- Status changed from s1a_analysis_started to s1b_analysis_finished
comment:3 Changed 15 years ago by deni
- Design_owners set to deni
- Status changed from s1b_analysis_finished to s1c_analysis_ok
- Imp._owners set to deni
- Analysis_reviewers set to deni
- Analysis_score changed from 0 to 4.5
comment:4 Changed 15 years ago by deni
- Owner changed from deyan to deni
- Status changed from s1c_analysis_ok to s2a_design_started
comment:5 Changed 15 years ago by deni
- Status changed from s2a_design_started to s2b_design_finished
- In fact, our list palettes already support icons - ListPaletteItem.render() returns an Object which includes a JComponent containing an icon.
- Adding icons to AllResourcesPalette:
- AllResourcesPalette.ResourceItem.render() should JLabel that displays both an icon and some text.
- The text will be the title of the resource.
- The icon will be obtained from the skin and will be depend on the resource kind.
- The icons will be set in the skin in the following way:
- The element class will be the resource class (ImageResourceR4, TextResourceR4, FrameR4, CommentFrameR4, etc).
- The property id will be defined in a public static final field in AllResourcesPalette.
- ImageUtil.loadIcon(String) will be used to get the icon itself.
- Icons should be set in the skin for the following resources:
- BookR4, PageR4 and FrameR4 in MainFuncResourcesModule
- ImageResourceR4 in ImageModule
- HotTextResourceR4 in TextFuncModule
- PdfResourceR4 in PdfModule
- ScriptResourceR4 in ScriptingModule
- CommentFrameR4 in CommentModule
- AllResourcesPalette.ResourceItem.render() should JLabel that displays both an icon and some text.
- Adding padding to ListPalette:
- In ListPalette.mainComponent()'s setup method we will add a new EmptyBorder. Its insets will be obtained from the skin.
- It will be set in the skin in the following ways:
- The element class will be the class of the concrete ListPalette, for example AllResourcesPalette.
- The property id will be defined in a public static final field in ListPalette.
- The value class will be ImmInsets.
- It will be moved from org.sophie2.base.model.book module to org.sophie2.base.commons.
- The padding insets for the AllResourcesPalette will be defined in MainFuncResourcesModule. I think (5, 5, 5, 5) is ok.
comment:6 Changed 15 years ago by deni
- Actually, the resource for comments is CommentStream, not CommentFrameR4.
comment:7 Changed 15 years ago by pap
- Status changed from s2b_design_finished to s2c_design_ok
- Design_score changed from 0 to 3.5
- Design_reviewers set to pap
- Move ImmInsetsTest and ImmInsetsPersister to the appropriate modules too.
- It would be nice to keep the insets in a property and not to query the skin every time.
- Maybe the icon can be kept in a property too
comment:8 Changed 15 years ago by deni
- Status changed from s2c_design_ok to s3a_implementation_started
comment:9 Changed 15 years ago by deni
- Status changed from s3a_implementation_started to s3b_implementation_finished
- Adding the icons was not done via AllResourcesPalette.ResourceItem.render() because but using a custom ListCellRenderer. This preserves changing the background color to blue on selection. Besides, it enables us to have different icons for the different states (for now, only selected/deselected).
- Source code: [8711]
comment:10 Changed 15 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, todor, deyan
Merged to the trunk at [8719].
comment:11 Changed 13 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.