Hi Sebastien,

I am CCing the list again, as I know Andrea is also working with the
printing framework, and Jesse is the only person actually working in
that area of the code now. (I hope to be soon!)

Comments are inline.

[EMAIL PROTECTED] wrote:
You'll find my responses in the mail content :

-----Richard Gould <[EMAIL PROTECTED]> a écrit : -----

    Pour : [EMAIL PROTECTED]
    De : Richard Gould <[EMAIL PROTECTED]>
    Date : 23/01/2006 10:19PM
    cc: User-friendly Desktop Internet GIS
    <[email protected]>
    Objet : Re: [udig-devel] More about printing capabilities

    Hi Sebastien,

    This is great. We haven't actually had any serious users of the
    printing
    plug-ins before, so they are largely untested. You are bound to
    encounter numerous bugs during your work. And we would love it if you
    contributed the code to the uDig project, and we will likely include it
    in a release.

    Part of the code itself is not very pretty - namely the ui plug-in in
    regards to the GEF Editor (Template/Page editor). A lot of it was
    semi-experimental and needs to be cleaned up a bit.

    [EMAIL PROTECTED] wrote:
     > Our goal is to :
     >
     >           o Print pre-configured maps (centered on filtered features
     >             collections), with some (text and image) attributes
    around
     >             it. The layout (template) will depend on the feature
    type.

    This is interesting. When a user clicks "Print", will you pop up a
    dialog asking them which feature type they would like to base their
    page
    on? And then the according Template will be selected?

    SP : Yes, that right!!

     >           o Use differents templates (one or more for each
    feature type
     >             : list, detail, how to go there, usw...).
     >           o Print several maps on each template,

    This should be possible now. Even though a Template can only be
    initialized with one map, a user should be able to drag a new MapBox
    from the Palette (on the right side of the Page Editor screen) on to
    the
    page, and a new map box will be created. Then they would choose the map
    that is in the box. I think there are some bugs (or it just wasn't
    completed).

    SPI : This feature doesn't work for me!! I've downloaded the 1.1M2
    version, but i have no mapbox in the toolbar!

Ahh yes. This makes sense and is a bug from a fix that I haven't
implemented. Basically the current MapBox is not a normal box - it
doesn't behave properly. This needs to be fixed, and once it is, this
should be enabled.


     However, your idea of a List of maps is a good one, and
    would allow for more extensive Template selection dialogs. ("Print" -->
    "Selected n maps" --> "Here are the templates that support n maps",
    etc.)

    SPI: I'm not sure to understand what you mean? Do you want as
    cascading templates' selection? Why not?

From the description of your requirements, it sounds like we should
have a "Create Page" wizard, rather than the small dialog we have now,
that only asks you to choose a Template. I'll have to give this one more
thought.



     >           o Adding non-geographical image (static or attributes
    linked
     >             images) on a template (eg: society logos, pictures...),

    Yes, this is possible. Simply create a new box that draws the image in
    its draw() method.

    SPI : It's done, but not by a very clean way... I think I need to
    use EMF to do so... Could you help me please?

Nope, EMF is not necessary. (At least, it shouldn't be. It is possible
that it might be needed for persistence, but that would be a bug)

You should just be able to declare an extension of type "net.refractions.udig.printing.ui.boxFactories", with a class that implements net.refractions.udig.printing.ui.BoxFactory. This BoxFactory will create your new kind of Box ("StaticImageBox" for example). The new Box itself will implement net.refractions.udig.printing.model.Box.

This Box should then appear in the Palette viewing on the right side of the PageEditor. If it does not, then it is a bug.


     >           o Adding multi-lines text fields on a template,

    Yes, this one is definitely needed. The one LabelBox available now is
    not very nice.

    SPI: I'm starting to work on it... I'm starting by using the
    StyledText class for the editor part, but i don't know how to draw
    several lines in the draw section. Do you think i need to parse the
    string and print each line separetly?

That's interesting. I'm not familiar with the StyledText class. I don't really have any ideas here.


     >           o Prints sheets directly from uDig, without going through
     >             Template Editor each time (just select the printer).

    Do you mean "Print"->"Select Template"->"Select Printer"?

    SPI : Yes, I think we could choose in the pref. tab (with a check
    box) to launch or not the template editor each time you want to print.
    I must notice that our business needs is to print data without the
    user needs to select the map area (we want to use a auto-centered
    function using feature attribute)

Interesting. So to clarify: User selects "Print"->"Choose attribute", map centers on that attribute and prints?


     >           o Configure printing setup : choose which attributes to
    print,
     >             launch cascading printing (for example if an area owning
     >             several sub-areas, launch a detailled print job for each
     >             sub-area)

    I don't quite understand this one either.

    SPI: Always for our needs. For example : The user wants to print a
    map centered on Paris (France), he maybe wants to print automaticaly
    touristic details on others sheets (the eiffel tower, "les champs
    élysés", EuroDisneyLand, the olympic games site ;o) ...). Is it clear?

Yes, and I think this should be automatic already. You can turn on
labelling while in the map view by changing the style, and that should
print. I'm not sure if it is tested.


     >           o Choose templates and configure them from the «
    preferences »
     >             tab or the application configuration file.

    I believe the default template is configurable from the perferences
    dialog, but no other options are.

    SPI : We cannot do many things in the prefs tab... just seeing the
    template's name (with the 1.1M2 version)

Yes, expansion of the preferences page is desired.


     >
     > And if possible :
     >
     >           o Be able to fully modify printing templates and save
    them on
     >             disk with the Template Editor.

    This would be great. We were hoping for some functionality like this,
    but we never implemented it.

    SPI : I think it's like the TemplateEditor should be like another
    application... with load/edit/save capabilities... A lot of job!!

Definitely. We thought about it while designing uDig, but it is a lot of
work. I am definitely interested in helping out though.


     >
     > What we have done :
     >
     > At the moment, we have changed the templates in order to add several
     > maps per template. To do so, we did :
     >
     >           o We have changed the « Template » and the «
    BasicTemplate »
     >             (uDig 1.0.5) classes in order to use a list of map as map
     >             parameter

Please feel free to send us this code, and I will look at it and integrated it into uDig.

     >           o Create a new « OurTemplate » template
     >           o We have Modified the « CreatePageAction » in order to add
     >             our template in the choice-list and create here the other
     >             maps (used in the templates)

    This is great. I don't believe the code has changed at all from
    1.0.5 to
    1.1.x.

     >
     > What we plan to do :
     >
     >           o Create new templates : one for each layout we need
    for the
     >             different feature types
     >           o Create new "Box" classes for the "dynamic-generated" maps
     >           o Create new "Box" classes for static images and multi-line
     >             text fields.
     >           o Find a solution to add such features without having to
     >             modify uDig directly as we do today.

    Modifying uDig directly is not so bad. If the modification is required,
    it represents an area that requires work, and it should probably be put
    into the uDig code base, so please keep us informed.

    SPI: Of course i can! But could show us how to use EMF and GEF please?

The Eclipse website has several good articles on using GEF and EMF.

Also, feel free to ask us questions. I am the most familiar with GEF and Jesse is most familiar with EMF.


     >
     > Are we on the right way ? What are the plans for the version 1.1
    ? Will
     > the template editor be abble to add non-geographical images and
    other
     > components ?

    This all sounds very good. Ideally I would like to make user-interface
    improvements to the Page Editor, but I am currently working on another
    project now that is keeping me very busy. I'm not sure I will be
    able to
    work on it any time soon.

     >
     > Thank's for any answer that could help us to go further in the
    printing
     > capabilities of uDig. We are ready to work around this.
     >

    Just let me know if you have any further questions/concerns. You can
    also catch me in realtime on #udig on irc.freenode.net.


    Cheers,

    Richard Gould




_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to