Difference: DpHipePreferences (13 vs. 14)

Revision 142009-10-23 - JaimeSaiz

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"

HIPE Preferences

Line: 294 to 294
 

Deleted:
<
<
// The event class class SplitLocationChangeEvent extends SiteEvent { private final int _location;

SplitLocationChangeEvent(Object source, int location) { super(source); _location = location; }

int getLocation() { return _location; } }

 // The notifier class public class SplittedEditor extends AbstractEditorComponent<SomeSelection> {

// Suppose we detect changes in the split pane here

Changed:
<
<
private void splitMoved(int newLocation) { SiteEvent event = new SplitLocationChangeEvent(this, newLocation);
>
>
private void splitMoved(float newLocation) { SiteEvent event = new PreferenceChangeRequestEvent(this, category, key, newLocation);
  getPart().getEventHandler().trigger(event); } }
Line: 324 to 312
  // Fill the panel ... // and register to split changes SiteEventHandler eventHandler = SiteUtil.getSite().getEventHandler();
Changed:
<
<
eventHandler.addEventListener(SplitLocationChangeEvent.class, this);
>
>
eventHandler.addEventListener(PreferenceChangeRequestEvent.class, this);
  }

@Override public void selectionChanged(SiteEvent event) {

Changed:
<
<
int location = ((SplitLocationChangeEvent)event).getLocation();
>
>
Float location = (Float)((PreferenceChangeRequestEvent)event).getNewValue();
  setValue("splitLocation", location); // update the value in the panel saveChanges(); // and save it }
 
This site is powered by the TWiki collaboration platform Powered by Perl