Ticket #2293 (closed tweak: obsolete)

Opened 15 years ago

Last modified 13 years ago

copy-image-to-pwa – Paste images from Clipboard

Reported by: deyan Owned by: deni
Priority: major Milestone: X3
Component: uncategorized Version: 2.0
Keywords: Cc: deni
Category: unknown Effort:
Importance: 60 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:
Design_reviewers: meddle, meddle Imp._reviewers: meddle, deyan
Test_reviewers: Analysis_score: 4
Design_score: 3.5 Imp._score: 3
Test_score: 0

Description (last modified by deyan) (diff)

Provide paste image data in Sophie.

  • When pasted in PWA, a frame is created with the data

Pasted resources should be named „Image A“, „Image B“ and so on (like pages and frames)

Change History

comment:1 Changed 15 years ago by deyan

  • Category set to unknown
  • Status changed from new to s1a_analysis_started
  • Description modified (diff)
  • Analysis_score set to 0
  • Test_score set to 0
  • Summary changed from copy-image-to – Paste images from Clipboard to copy-image-to-pwa – Paste images from Clipboard
  • Design_score set to 0
  • Owner set to deyan
  • Imp._score set to 0

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

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
  • Inserting a new image frame:
    • Create a new class ImageLogic in org.sophie2.main.func.image with a single operation ON_PASTE_IMAGE that handles pasting image data from the clipboard by inserting a new image frame.
    • It should use ImageResourceManager and ResourceImportUtil.dropResource(ResourceImportProvider, BookH, ElementH, ImmPoint, DndTransferable).
  • Naming the resource:
    • Create a new method in ResourceImportManager that gets the default title of resources inserted by the manager: public String getDefaultTitle()
      • In the base class it should return "Resource".
      • Override it in ImageImportManager to return "Image" and in TextImportManager to return "Text".
    • Make ResourceImportUtil.dropResource(...) use ResourceUtil.getNextTitle(ResourceRefR4, String) to determine the title of the resource. The default name can be obtained from the manager.

comment:6 Changed 15 years ago by deni

  • Status changed from s2b_design_finished to s2c_design_ok

comment:7 Changed 15 years ago by deni

  • Status changed from s2c_design_ok to s3a_implementation_started

comment:8 Changed 15 years ago by deni

  • Status changed from s3a_implementation_started to s3b_implementation_finished

Source code: [8594]

comment:9 Changed 15 years ago by meddle

  • Cc deni added
  • Design_score changed from 0 to 2.5
  • Design_reviewers set to meddle
  • Status changed from s3b_implementation_finished to s1c_analysis_ok
  • The naming is done using unnecessary code.
    • You can get the kind of the resource from it's import manager.
    • Than by that kind you can get the class of the resource to import.
    • Than with the class by reflection you can get the DEFAUL_TITLE of the resource.
  • Don't add additional method to the import manager, it is huge...
  • Add private helper method that does the things from point one to the ResourceImportUtil
  • Use that, I fail this implementation now...
  • But good ideas, I think you didn't know this method of retrieving... but is better to write it yourself.

2.5p

comment:10 Changed 15 years ago by deni

  • Status changed from s1c_analysis_ok to new
  • I find the convention of having a public static final variable named "DEFAULT_TITLE" in every ResourceR4 too complex and difficult to maintain.
  • I'm not totally against it, but I just don't like it.
  • And since I'm not sure whether I'll have time for this on Friday, I'm changing the ticket's status to new, so that somebody else could take it.

comment:11 Changed 15 years ago by dido

  • Importance set to 60

comment:12 Changed 15 years ago by deni

  • Status changed from new to s1a_analysis_started

comment:13 Changed 15 years ago by deni

  • Status changed from s1a_analysis_started to s1b_analysis_finished

comment:14 Changed 15 years ago by deni

  • Status changed from s1b_analysis_finished to s1c_analysis_ok

comment:15 Changed 15 years ago by deni

  • Status changed from s1c_analysis_ok to s2a_design_started

comment:16 Changed 15 years ago by deni

  • Status changed from s2a_design_started to s2b_design_finished

comment:17 Changed 15 years ago by deni

  • Status changed from s2b_design_finished to s2c_design_ok

comment:18 Changed 15 years ago by deni

  • Status changed from s2c_design_ok to s3a_implementation_started

comment:19 Changed 15 years ago by deni

  • Status changed from s3a_implementation_started to s3b_implementation_finished

comment:20 Changed 15 years ago by meddle

  • Status changed from s3b_implementation_finished to s3c_implementation_ok
  • Design_score changed from 2.5 to 3.5
  • Design_reviewers changed from meddle to meddle, meddle
  • Imp._score changed from 0 to 3
  • Imp._reviewers set to meddle, deyan

Merged to the trunk at [8635].

Use the default constants like ResourceR4.DEFAULT_TITLE for default results.
Too slow for big images... May be ticked for this?

comment:21 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.