01: package com.vividsolutions.jump.workbench.ui;
02:
03: import com.vividsolutions.jump.feature.Feature;
04:
05: public abstract class AbstractFeatureTextWriter {
06: private String description;
07: private String shortDescription;
08: private boolean wrapping;
09:
10: public AbstractFeatureTextWriter(boolean wrapping,
11: String shortDescription, String description) {
12: this .wrapping = wrapping;
13: this .shortDescription = shortDescription;
14: this .description = description;
15: }
16:
17: public abstract String write(Feature feature);
18:
19: /**
20: * Returns a short (2-3 letters) description to display on the button.
21: */
22: public String getShortDescription() {
23: return shortDescription;
24: }
25:
26: /**
27: * Returns a description to display on the tooltip.
28: */
29: public String getDescription() {
30: return description;
31: }
32:
33: /**
34: * Returns whether to wrap the text.
35: */
36: public boolean isWrapping() {
37: return wrapping;
38: }
39: }
|