Mercurial > hg > de.mpg.mpiwg.itgroup.digilib.core
comparison src/de/mpg/mpiwg/itgroup/digilib/digiImage/properties/DigiImagePropertyListener.java @ 26:183c3e96f6c3
cleaned code
author | dwinter |
---|---|
date | Mon, 10 Jan 2011 12:01:25 +0100 |
parents | src/de/mpg/mpiwg/itgroup/digilib/digiImage/properties/PropertyListener.java@6e7bb3467531 |
children | fbcf122a6a24 |
comparison
equal
deleted
inserted
replaced
25:6e7bb3467531 | 26:183c3e96f6c3 |
---|---|
1 package de.mpg.mpiwg.itgroup.digilib.digiImage.properties; | |
2 | |
3 import org.eclipse.swt.events.ModifyEvent; | |
4 import org.eclipse.swt.events.ModifyListener; | |
5 import org.eclipse.swt.widgets.Text; | |
6 import org.eclipse.ui.views.properties.IPropertySource; | |
7 | |
8 import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImage; | |
9 | |
10 /** | |
11 * @author dwinter | |
12 * | |
13 * Listener on digiImage properties | |
14 */ | |
15 public class DigiImagePropertyListener implements ModifyListener { | |
16 | |
17 private String key; | |
18 private DigiImage digiImage; | |
19 public DigiImagePropertyListener(String key, DigiImage digiImage){ | |
20 this.key = key; | |
21 this.digiImage = digiImage; | |
22 } | |
23 | |
24 | |
25 | |
26 public void modifyText(ModifyEvent event) { | |
27 DigiImageProperties properties = (DigiImageProperties) digiImage | |
28 .getAdapter(IPropertySource.class); | |
29 Text t = (Text)event.getSource(); | |
30 String c = t.getText(); | |
31 System.out.println(c); | |
32 | |
33 properties.setPropertyValueNoDraw(key, (String)c); | |
34 } | |
35 | |
36 | |
37 | |
38 } | |
39 | |
40 |