Home » Eclipse Projects » Remote Application Platform (RAP) » Color Dialog?
Color Dialog? [message #78804] |
Fri, 21 March 2008 06:47  |
Eclipse User |
|
|
|
Originally posted by: anupgokhale.rediffmail.com
How to use a color selection dialog or font selection dialog in RAP?
Regards,
AGG
|
|
| |
Re: Color Dialog? [message #78942 is a reply to message #78836] |
Mon, 24 March 2008 00:29   |
Eclipse User |
|
|
|
Originally posted by: anupgokhale.rediffmail.com
Hi Ralf,
I need the color and font dialog functionality as I am developing a
project that uses BIRT in RAP. My application has quite a few graphical
reports, and we have implemented our own chart designer, that allows the
user to customize the appearance of a chart according to his needs. Thus
the user should be able to customize the color(s) and font(s) of the
chart title, each data series, X and Y axis labels etc.
We have already implemented a similar functionality in a RCP app and
currently we are in the middle of porting the same to RAP.
In my particular case (and i guess in most cases where users will want a
font dialog in RAP), the font names displayed should be the one
registered on the server side, as the report will ultimately be
generated on the server. Currently we have solved these problems by
creating our own color dialog and font dialog in which we use the
GraphicEnvironment's getAllFontNames() and display the same to the user
in a drop down. However for the color dialog, we are using a JFace
dialog and then adding color selection functionality to it. Any pointers
as to how we can use the actual ColorDialog class?
Regards,
Anup Gokhale
Ralf Sternberg wrote:
> Hi Anup,
>
> Anup Gokhale schrieb:
>> How to use a color selection dialog or font selection dialog in RAP?
>
> Neither one does yet exist in RAP. Color dialog should be easy to
> implement, the reason it doesn't exist yet is simply that it hasn't been
> requested so far. Feel free to open a bug request for it.
>
> Font dialog might be problematic, as RAP can not know which font
> families are available on the client. I could only imagine a simplified
> font dialog that allows to select size, bold, italic, etc. Just for
> curiosity, what do you need these dialogs for?
>
> Best, Ralf
|
|
|
Re: Color Dialog? [message #78950 is a reply to message #78942] |
Mon, 24 March 2008 00:43   |
Eclipse User |
|
|
|
Originally posted by: anupgokhale.rediffmail.com
I have filed a new bug Bug 223606 for the same.
Anup Gokhale wrote:
> Hi Ralf,
>
> I need the color and font dialog functionality as I am developing a
> project that uses BIRT in RAP. My application has quite a few graphical
> reports, and we have implemented our own chart designer, that allows the
> user to customize the appearance of a chart according to his needs. Thus
> the user should be able to customize the color(s) and font(s) of the
> chart title, each data series, X and Y axis labels etc.
>
> We have already implemented a similar functionality in a RCP app and
> currently we are in the middle of porting the same to RAP.
>
> In my particular case (and i guess in most cases where users will want a
> font dialog in RAP), the font names displayed should be the one
> registered on the server side, as the report will ultimately be
> generated on the server. Currently we have solved these problems by
> creating our own color dialog and font dialog in which we use the
> GraphicEnvironment's getAllFontNames() and display the same to the user
> in a drop down. However for the color dialog, we are using a JFace
> dialog and then adding color selection functionality to it. Any pointers
> as to how we can use the actual ColorDialog class?
>
> Regards,
>
> Anup Gokhale
>
> Ralf Sternberg wrote:
>> Hi Anup,
>>
>> Anup Gokhale schrieb:
>>> How to use a color selection dialog or font selection dialog in RAP?
>>
>> Neither one does yet exist in RAP. Color dialog should be easy to
>> implement, the reason it doesn't exist yet is simply that it hasn't
>> been requested so far. Feel free to open a bug request for it.
>>
>> Font dialog might be problematic, as RAP can not know which font
>> families are available on the client. I could only imagine a
>> simplified font dialog that allows to select size, bold, italic, etc.
>> Just for curiosity, what do you need these dialogs for?
>>
>> Best, Ralf
|
|
|
Re: Color Dialog? [message #79171 is a reply to message #78942] |
Tue, 25 March 2008 07:00  |
Eclipse User |
|
|
|
Originally posted by: rsternberg.innoopract.com
Hi Anup,
Anup Gokhale wrote:
> I need the color and font dialog functionality as I am developing a
> project that uses BIRT in RAP. My application has quite a few graphical
> reports, and we have implemented our own chart designer, that allows the
> user to customize the appearance of a chart according to his needs. Thus
> the user should be able to customize the color(s) and font(s) of the
> chart title, each data series, X and Y axis labels etc.
That's an interesting case, thanks for your feedback.
But that means that the colors and fonts which are selected in the dialogs
are not used in the UI but in the backend of your application. This is fine
for colors but I think for fonts it's a problem. See below.
> We have already implemented a similar functionality in a RCP app and
> currently we are in the middle of porting the same to RAP.
>
> In my particular case (and i guess in most cases where users will want a
> font dialog in RAP), the font names displayed should be the one
> registered on the server side, as the report will ultimately be
> generated on the server.
I do not agree to this point. Many applications use the selected fonts in
the frontend (such as the Eclipse IDE).
In a stand-alone RCP application, it makes no difference, whether selected
fonts are used in the frontend or in the backend as long as both live on
the same machine. But in RAP the frontend is always on the client (whose
available fonts we do not know) and the backend is always on the server
(which doesn't even have to have an X server and any fonts installed).
There is no problem with colors, as there are virtually all the same
everywhere (24bit RGB color space). Thus I think we can provide the
ColorDialog but for fonts a custom dialog is more appropriate as long as we
don't have some clever solution.
> Currently we have solved these problems by
> creating our own color dialog and font dialog in which we use the
> GraphicEnvironment's getAllFontNames() and display the same to the user
> in a drop down. However for the color dialog, we are using a JFace
> dialog and then adding color selection functionality to it. Any pointers
> as to how we can use the actual ColorDialog class?
If you like to implement the ColorDialog by yourself, you could create a
custom widget that encapsulates the qooxdoo ColorSelector [1]. We are open
for contributions :) Please refer to the RAP help [2] for how to write
custom widgets.
Best,
Ralf
[1]
http://demo.qooxdoo.org/current/demobrowser/#example~ColorSe lector_1.html
[2]
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. rap.help/help/html/advanced/custom-widget.html
|
|
|
Goto Forum:
Current Time: Mon May 05 01:53:45 EDT 2025
Powered by FUDForum. Page generated in 0.05172 seconds
|