# HG changeset patch # User dwinter # Date 1318261922 -7200 # Node ID abcce1110d849e0ccd4caeb5925784a5ab64a84e # Parent 207dae29cc09cd7202d7b0d4af6f66bd41671c50 new tabs diff -r 207dae29cc09 -r abcce1110d84 plugin.xml --- a/plugin.xml Mon Oct 10 13:51:14 2011 +0200 +++ b/plugin.xml Mon Oct 10 17:52:02 2011 +0200 @@ -80,12 +80,21 @@ + label="Size and Scaling"> + + + + label="DPI"> @@ -115,6 +124,28 @@ type="de.mpg.mpiwg.itgroup.digilib.digiImage.TextGridDigiImage"> + + + + + + + + + + + + texts = new HashMap(); @@ -37,10 +38,15 @@ private Button button; + //private String labelString = "wh:wh;rgba:rgba;dW:dw;mo:mo;rot:rot;ddpi:ddpi;ddpix:ddpix;ddpiy:ddpiy;brgt:brgt;ws:ws;rgbm:rgbm;wy:wy;wx:ww;dh:dh;pn:pn;cont:cont;fn:fn"; - public String labelString = "wh:wh;dw:dw;ws:ws;wy:wy;wx:ww;dh:dh"; + protected String getLabelString() { + return "wh:relative height of the image area (0 <= wh <= 1);dw:destination image width (pixels);ws:additional scaling factor;wy:relative y offset;wx:relative x offset;dh:destination image height (pixels)"; + + } - private Map parseLabelString(String labelString) { + private Map parseLabelString() { + String labelString= getLabelString(); HashMap ret = new HashMap(); String[] splitted = labelString.split(";"); for (int i = 0; i < splitted.length; i++) { @@ -52,6 +58,8 @@ return ret; } + + /* * (non-Javadoc) * @@ -64,7 +72,7 @@ TabbedPropertySheetPage aTabbedPropertySheetPage) { super.createControls(parent, aTabbedPropertySheetPage); - Map labels = parseLabelString(labelString); + Map labels = parseLabelString(); DigiImageParameter dp = new DigiImageParameter(""); GridLayout gridLayout = new GridLayout(1, false); @@ -80,7 +88,7 @@ Text t = getWidgetFactory().createText(composite, ""); texts.put(key, t); data = new FormData(); - data.left = new FormAttachment(0, STANDARD_LABEL_WIDTH); + data.left = new FormAttachment(0, LABEL_WIDTH); data.right = new FormAttachment(100, 0); data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE); t.setLayoutData(data); @@ -121,7 +129,7 @@ // Map pms = // digiImage.getParameter().createMapFromParameters(null); - Map labels = parseLabelString(labelString); + Map labels = parseLabelString(); for (String key : digiImage.getParameter() .createMapFromParameters(null).keySet()) {