Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » WidgetSelector
WidgetSelector [message #492091] Sun, 18 October 2009 14:47 Go to next message
Eclipse UserFriend
Originally posted by: nlippke.t-online.de

Hi,

by looking at the matches function of the WidgetSelector I read:

private boolean matches( final Widget widget, final String[] constraints ) {
boolean result = true;
for( int i = 0; i < constraints.length && result; i++ ) {
String string = constraints[ i ];
if( string.startsWith( "." ) ) {
String variant = string.substring( 1 );
result &= hasVariant( widget, variant );
} else {
Constraint constraint = ( Constraint )constraintMap.get( string );
result &= constraint != null && constraint.matches( widget );
}
}
return result;
}

So any widget can have either a custom variant or a special state, but not
both.
So let's say if I have my own variant of a button, theming it like

button.custom:selected {
....
}

will not work. Right? Or am I missing something?

Regards,

Niels
Re: WidgetSelector [message #492092 is a reply to message #492091] Sun, 18 October 2009 15:09 Go to previous message
Eclipse UserFriend
Originally posted by: nlippke.t-online.de

Ok, I am missing something.

the state information is handled in the ConditionalValues somewhere else...

Sorry, forget about it ;)

"Niels Lippke" <nlippke@t-online.de> schrieb im Newsbeitrag
news:hbf9r5$lus$1@build.eclipse.org...
> Hi,
>
> by looking at the matches function of the WidgetSelector I read:
>
> private boolean matches( final Widget widget, final String[] constraints )
> {
> boolean result = true;
> for( int i = 0; i < constraints.length && result; i++ ) {
> String string = constraints[ i ];
> if( string.startsWith( "." ) ) {
> String variant = string.substring( 1 );
> result &= hasVariant( widget, variant );
> } else {
> Constraint constraint = ( Constraint )constraintMap.get( string );
> result &= constraint != null && constraint.matches( widget );
> }
> }
> return result;
> }
>
> So any widget can have either a custom variant or a special state, but
> not both.
> So let's say if I have my own variant of a button, theming it like
>
> button.custom:selected {
> ...
> }
>
> will not work. Right? Or am I missing something?
>
> Regards,
>
> Niels
Previous Topic:TrayDialog and HelpTray
Next Topic:Rearrangement of controls
Goto Forum:
  


Current Time: Tue Apr 23 07:29:48 GMT 2024

Powered by FUDForum. Page generated in 0.03000 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top