diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/DummySymbolizerWrapper.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/DummySymbolizerWrapper.java index 2e5df74..931465c 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/DummySymbolizerWrapper.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/DummySymbolizerWrapper.java @@ -107,8 +107,8 @@ public class DummySymbolizerWrapper extends SymbolizerWrapper { return; } markName = mark.getWellKnownName().evaluate(null, String.class); - if (markName == null || markName.equals("")) { - markName = "circle"; + if (markName == null || markName.equals("")) { //$NON-NLS-1$ + markName = "circle"; //$NON-NLS-1$ mark.setWellKnownName(ff.literal(markName)); } diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/FeatureTypeStyleWrapper.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/FeatureTypeStyleWrapper.java index 2cafe49..bcb5db3 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/FeatureTypeStyleWrapper.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/FeatureTypeStyleWrapper.java @@ -28,6 +28,8 @@ import java.util.List; import org.geotools.styling.FeatureTypeStyle; import org.geotools.styling.Rule; +import eu.udig.style.advanced.internal.Messages; + /** * A wrapper for the {@link FeatureTypeStyle} object to ease gui use. * @@ -61,7 +63,7 @@ public class FeatureTypeStyleWrapper { public String getName() { int indexOf = parent.getStyle().featureTypeStyles().indexOf(featureTypeStyle); - name = "group " + indexOf; + name = Messages.FeatureTypeStyleWrapper_0 + indexOf; featureTypeStyle.setName(name); return name; } @@ -99,7 +101,7 @@ public class FeatureTypeStyleWrapper { } else if (symbolizerWrapperClass.isAssignableFrom(PolygonSymbolizerWrapper.class)) { tmpRule = createDefaultPolygonRule(); } else { - throw new IllegalArgumentException("Unsupported symbolizer."); + throw new IllegalArgumentException("Unsupported symbolizer."); //$NON-NLS-1$ } } diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/LineSymbolizerWrapper.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/LineSymbolizerWrapper.java index 7861539..4fbb5a2 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/LineSymbolizerWrapper.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/LineSymbolizerWrapper.java @@ -115,7 +115,7 @@ public class LineSymbolizerWrapper extends SymbolizerWrapper { if (dashArray != null) { dash = getDashString(dashArray); } else { - dash = ""; + dash = ""; //$NON-NLS-1$ } // dashoffset dashOffset = stroke.getDashOffset().evaluate(null, String.class); diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/PointSymbolizerWrapper.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/PointSymbolizerWrapper.java index 0235546..5919735 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/PointSymbolizerWrapper.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/PointSymbolizerWrapper.java @@ -106,8 +106,8 @@ public class PointSymbolizerWrapper extends SymbolizerWrapper { return; } markName = mark.getWellKnownName().evaluate(null, String.class); - if (markName == null|| markName.equals("")) { - markName = "circle"; + if (markName == null|| markName.equals("")) { //$NON-NLS-1$ + markName = "circle"; //$NON-NLS-1$ mark.setWellKnownName(ff.literal(markName)); } diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/PolygonSymbolizerWrapper.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/PolygonSymbolizerWrapper.java index a60ca75..681631a 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/PolygonSymbolizerWrapper.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/PolygonSymbolizerWrapper.java @@ -111,7 +111,7 @@ public class PolygonSymbolizerWrapper extends LineSymbolizerWrapper { if (dashArray != null) { dash = Utilities.getDashString(dashArray); } else { - dash = ""; + dash = ""; //$NON-NLS-1$ } // dashoffset dashOffset = stroke.getDashOffset().evaluate(null, String.class); diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/SymbolizerWrapper.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/SymbolizerWrapper.java index 3529b74..337f1f3 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/SymbolizerWrapper.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/SymbolizerWrapper.java @@ -195,16 +195,16 @@ public abstract class SymbolizerWrapper { private String getExternalGraphicPath( ExternalGraphic extGraphic ) throws MalformedURLException { if (extGraphic == null) { - return ""; + return ""; //$NON-NLS-1$ } URL location = extGraphic.getLocation(); String urlString = location.toExternalForm(); - if (urlString.startsWith("http://")) { + if (urlString.startsWith("http://")) { //$NON-NLS-1$ return urlString; } else { File urlToFile = URLUtils.urlToFile(location); - if (urlString.equals("file:")) { - return ""; + if (urlString.equals("file:")) { //$NON-NLS-1$ + return ""; //$NON-NLS-1$ } else { return urlToFile.getAbsolutePath(); } @@ -228,8 +228,8 @@ public abstract class SymbolizerWrapper { Graphic graphic = pointSymbolizerWrapper.getGraphic(); graphic.graphicalSymbols().clear(); String urlStr = externalGraphicPath; - if (!externalGraphicPath.startsWith("http:") && !externalGraphicPath.startsWith("file:")) { - urlStr = "file:" + externalGraphicPath; + if (!externalGraphicPath.startsWith("http:") && !externalGraphicPath.startsWith("file:")) { //$NON-NLS-1$ //$NON-NLS-2$ + urlStr = "file:" + externalGraphicPath; //$NON-NLS-1$ } externalGraphic = sb.createExternalGraphic(new URL(urlStr), getFormat(externalGraphicPath)); graphic.graphicalSymbols().add(externalGraphic); @@ -271,8 +271,8 @@ public abstract class SymbolizerWrapper { graphic.graphicalSymbols().clear(); String urlStr = externalGraphicPath; - if (!externalGraphicPath.startsWith("http:") && !externalGraphicPath.startsWith("file:")) { - urlStr = "file:" + externalGraphicPath; + if (!externalGraphicPath.startsWith("http:") && !externalGraphicPath.startsWith("file:")) { //$NON-NLS-1$ //$NON-NLS-2$ + urlStr = "file:" + externalGraphicPath; //$NON-NLS-1$ } strokeExternalGraphicStroke = sb.createExternalGraphic(new URL(urlStr), getFormat(externalGraphicPath)); graphic.graphicalSymbols().add(strokeExternalGraphicStroke); @@ -305,8 +305,8 @@ public abstract class SymbolizerWrapper { } graphic.graphicalSymbols().clear(); String urlStr = externalGraphicPath; - if (!externalGraphicPath.startsWith("http:") && !externalGraphicPath.startsWith("file:")) { - urlStr = "file:" + externalGraphicPath; + if (!externalGraphicPath.startsWith("http:") && !externalGraphicPath.startsWith("file:")) { //$NON-NLS-1$ //$NON-NLS-2$ + urlStr = "file:" + externalGraphicPath; //$NON-NLS-1$ } if (fillExternalGraphicFill == null) { fillExternalGraphicFill = sb.createExternalGraphic(new URL(urlStr), getFormat(externalGraphicPath)); @@ -322,14 +322,14 @@ public abstract class SymbolizerWrapper { File f = new File(externalGraphicPath); String format = Utilities.getFormat(externalGraphicPath); if (!f.exists()) { - if (externalGraphicPath.startsWith("http://") || externalGraphicPath.startsWith("file:")) { + if (externalGraphicPath.startsWith("http://") || externalGraphicPath.startsWith("file:")) { //$NON-NLS-1$ //$NON-NLS-2$ url = new URL(externalGraphicPath); } } if (url == null) { url = f.toURI().toURL(); - if (externalGraphicPath.equals("")) { - url = new URL("file:"); + if (externalGraphicPath.equals("")) { //$NON-NLS-1$ + url = new URL("file:"); //$NON-NLS-1$ } } extGraphic.setLocation(url); diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/TextSymbolizerWrapper.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/TextSymbolizerWrapper.java index de5251e..081261b 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/TextSymbolizerWrapper.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/common/styleattributeclasses/TextSymbolizerWrapper.java @@ -415,7 +415,7 @@ public class TextSymbolizerWrapper extends SymbolizerWrapper { public void setMaxDisplacementVO( String maxDisplacementVO ) { this.maxDisplacementVO = maxDisplacementVO; - if (maxDisplacementVO == null || maxDisplacementVO.equals("")) { + if (maxDisplacementVO == null || maxDisplacementVO.equals("")) { //$NON-NLS-1$ textSymbolizer.getOptions().remove(VendorOptions.VENDOROPTION_MAXDISPLACEMENT.toString()); } else { textSymbolizer.getOptions().put(VendorOptions.VENDOROPTION_MAXDISPLACEMENT.toString(), maxDisplacementVO); @@ -424,7 +424,7 @@ public class TextSymbolizerWrapper extends SymbolizerWrapper { public void setRepeatVO( String repeatVO ) { this.repeatVO = repeatVO; - if (repeatVO == null || repeatVO.equals("") || geomType != SLD.LINE) { + if (repeatVO == null || repeatVO.equals("") || geomType != SLD.LINE) { //$NON-NLS-1$ textSymbolizer.getOptions().remove(VendorOptions.VENDOROPTION_REPEAT.toString()); } else { textSymbolizer.getOptions().put(VendorOptions.VENDOROPTION_REPEAT.toString(), repeatVO); @@ -433,7 +433,7 @@ public class TextSymbolizerWrapper extends SymbolizerWrapper { public void setAutoWrapVO( String autoWrapVO ) { this.autoWrapVO = autoWrapVO; - if (autoWrapVO == null || autoWrapVO.equals("")) { + if (autoWrapVO == null || autoWrapVO.equals("")) { //$NON-NLS-1$ textSymbolizer.getOptions().remove(VendorOptions.VENDOROPTION_AUTOWRAP.toString()); } else { textSymbolizer.getOptions().put(VendorOptions.VENDOROPTION_AUTOWRAP.toString(), autoWrapVO); @@ -442,7 +442,7 @@ public class TextSymbolizerWrapper extends SymbolizerWrapper { public void setSpaceAroundVO( String spaceAroundVO ) { this.spaceAroundVO = spaceAroundVO; - if (spaceAroundVO == null || spaceAroundVO.equals("")) { + if (spaceAroundVO == null || spaceAroundVO.equals("")) { //$NON-NLS-1$ textSymbolizer.getOptions().remove(VendorOptions.VENDOROPTION_SPACEAROUND.toString()); } else { textSymbolizer.getOptions().put(VendorOptions.VENDOROPTION_SPACEAROUND.toString(), spaceAroundVO); @@ -451,7 +451,7 @@ public class TextSymbolizerWrapper extends SymbolizerWrapper { public void setFollowLineVO( String followLineVO ) { this.followLineVO = followLineVO; - if (followLineVO == null || followLineVO.equals("") || geomType != SLD.LINE) { + if (followLineVO == null || followLineVO.equals("") || geomType != SLD.LINE) { //$NON-NLS-1$ textSymbolizer.getOptions().remove(VendorOptions.VENDOROPTION_FOLLOWLINE.toString()); } else { textSymbolizer.getOptions().put(VendorOptions.VENDOROPTION_FOLLOWLINE.toString(), followLineVO); @@ -460,7 +460,7 @@ public class TextSymbolizerWrapper extends SymbolizerWrapper { public void setMaxAngleDeltaVO( String maxAngleDeltaVO ) { this.maxAngleDeltaVO = maxAngleDeltaVO; - if (maxAngleDeltaVO == null || maxAngleDeltaVO.equals("") || geomType != SLD.LINE) { + if (maxAngleDeltaVO == null || maxAngleDeltaVO.equals("") || geomType != SLD.LINE) { //$NON-NLS-1$ textSymbolizer.getOptions().remove(VendorOptions.VENDOROPTION_MAXANGLEDELTA.toString()); } else { textSymbolizer.getOptions().put(VendorOptions.VENDOROPTION_MAXANGLEDELTA.toString(), maxAngleDeltaVO); diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/internal/Messages.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/internal/Messages.java index c600373..d2c3de0 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/internal/Messages.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/internal/Messages.java @@ -4,6 +4,12 @@ import org.eclipse.osgi.util.NLS; public class Messages extends NLS { private static final String BUNDLE_NAME = "eu.udig.style.advanced.internal.messages"; //$NON-NLS-1$ + public static String Alignments_0; + public static String Alignments_1; + public static String Alignments_2; + public static String Alignments_3; + public static String Alignments_4; + public static String Alignments_5; public static String BoderParametersComposite_0; public static String BoderParametersComposite_1; public static String BoderParametersComposite_10; @@ -15,13 +21,23 @@ public class Messages extends NLS { public static String BoderParametersComposite_6; public static String BoderParametersComposite_8; public static String BoderParametersComposite_9; + public static String CoverageColorEditor_10; + public static String CoverageColorEditor_2; + public static String CoverageColorEditor_3; + public static String CoverageColorEditor_4; + public static String CoverageColorEditor_5; + public static String CoverageColorEditor_6; + public static String CoverageColorEditor_7; + public static String CoverageColorEditor_9; public static String CoverageColorMaskStyleEditorPage_0; public static String CoverageColorMaskStyleEditorPage_1; public static String CoverageStyleEditorPage_0; public static String CoverageStyleEditorPage_2; public static String CoverageStyleEditorPage_4; + public static String FeatureTypeStyleWrapper_0; public static String FiltersComposite_0; public static String FiltersComposite_3; + public static String FontEditor_0; public static String GroupRulesTreeLabelProvider_0; public static String GroupRulesTreeLabelProvider_1; public static String LineGeneralParametersComposite_0; @@ -74,6 +90,138 @@ public class Messages extends NLS { public static String LinePropertiesEditor_7; public static String LinePropertiesEditor_8; public static String LinePropertiesEditor_9; + public static String PointBoderParametersComposite_0; + public static String PointBoderParametersComposite_1; + public static String PointBoderParametersComposite_2; + public static String PointBoderParametersComposite_3; + public static String PointBoderParametersComposite_4; + public static String PointBoderParametersComposite_5; + public static String PointCharacterChooserComposite_0; + public static String PointFillParametersComposite_0; + public static String PointFillParametersComposite_1; + public static String PointFillParametersComposite_2; + public static String PointFillParametersComposite_3; + public static String PointFillParametersComposite_4; + public static String PointGeneralParametersComposite_0; + public static String PointGeneralParametersComposite_1; + public static String PointGeneralParametersComposite_2; + public static String PointGeneralParametersComposite_3; + public static String PointGeneralParametersComposite_4; + public static String PointGeneralParametersComposite_5; + public static String PointGeneralParametersComposite_6; + public static String PointGeneralParametersComposite_7; + public static String PointLabelsParametersComposite_0; + public static String PointLabelsParametersComposite_1; + public static String PointLabelsParametersComposite_10; + public static String PointLabelsParametersComposite_11; + public static String PointLabelsParametersComposite_12; + public static String PointLabelsParametersComposite_2; + public static String PointLabelsParametersComposite_3; + public static String PointLabelsParametersComposite_5; + public static String PointLabelsParametersComposite_6; + public static String PointLabelsParametersComposite_7; + public static String PointLabelsParametersComposite_8; + public static String PointLabelsParametersComposite_9; + public static String PointPropertiesComposite_0; + public static String PointPropertiesComposite_1; + public static String PointPropertiesComposite_10; + public static String PointPropertiesComposite_11; + public static String PointPropertiesComposite_12; + public static String PointPropertiesComposite_13; + public static String PointPropertiesComposite_14; + public static String PointPropertiesComposite_18; + public static String PointPropertiesComposite_19; + public static String PointPropertiesComposite_2; + public static String PointPropertiesComposite_20; + public static String PointPropertiesComposite_21; + public static String PointPropertiesComposite_22; + public static String PointPropertiesComposite_23; + public static String PointPropertiesComposite_24; + public static String PointPropertiesComposite_25; + public static String PointPropertiesComposite_8; + public static String PointPropertiesComposite_9; + public static String PointPropertiesEditor_0; + public static String PointPropertiesEditor_1; + public static String PointPropertiesEditor_10; + public static String PointPropertiesEditor_11; + public static String PointPropertiesEditor_12; + public static String PointPropertiesEditor_13; + public static String PointPropertiesEditor_14; + public static String PointPropertiesEditor_15; + public static String PointPropertiesEditor_16; + public static String PointPropertiesEditor_17; + public static String PointPropertiesEditor_18; + public static String PointPropertiesEditor_19; + public static String PointPropertiesEditor_2; + public static String PointPropertiesEditor_20; + public static String PointPropertiesEditor_21; + public static String PointPropertiesEditor_22; + public static String PointPropertiesEditor_23; + public static String PointPropertiesEditor_24; + public static String PointPropertiesEditor_25; + public static String PointPropertiesEditor_26; + public static String PointPropertiesEditor_27; + public static String PointPropertiesEditor_3; + public static String PointPropertiesEditor_4; + public static String PointPropertiesEditor_5; + public static String PointPropertiesEditor_6; + public static String PointPropertiesEditor_7; + public static String PointPropertiesEditor_8; + public static String PointPropertiesEditor_9; + public static String PolygonFillParametersComposite_0; + public static String PolygonFillParametersComposite_1; + public static String PolygonFillParametersComposite_2; + public static String PolygonFillParametersComposite_3; + public static String PolygonFillParametersComposite_4; + public static String PolygonFillParametersComposite_5; + public static String PolygonFillParametersComposite_6; + public static String PolygonFillParametersComposite_7; + public static String PolygonFillParametersComposite_8; + public static String PolygonGeneralParametersComposite_0; + public static String PolygonGeneralParametersComposite_1; + public static String PolygonGeneralParametersComposite_2; + public static String PolygonGeneralParametersComposite_3; + public static String PolygonLabelsParametersComposite_0; + public static String PolygonLabelsParametersComposite_1; + public static String PolygonLabelsParametersComposite_3; + public static String PolygonLabelsParametersComposite_4; + public static String PolygonLabelsParametersComposite_5; + public static String PolygonLabelsParametersComposite_6; + public static String PolygonLabelsParametersComposite_7; + public static String PolygonLabelsParametersComposite_8; + public static String PolygonPropertiesComposite_1; + public static String PolygonPropertiesComposite_2; + public static String PolygonPropertiesComposite_3; + public static String PolygonPropertiesComposite_4; + public static String PolygonPropertiesComposite_5; + public static String PolygonPropertiesComposite_6; + public static String PolygonPropertiesEditor_0; + public static String PolygonPropertiesEditor_1; + public static String PolygonPropertiesEditor_10; + public static String PolygonPropertiesEditor_11; + public static String PolygonPropertiesEditor_12; + public static String PolygonPropertiesEditor_13; + public static String PolygonPropertiesEditor_14; + public static String PolygonPropertiesEditor_15; + public static String PolygonPropertiesEditor_16; + public static String PolygonPropertiesEditor_17; + public static String PolygonPropertiesEditor_18; + public static String PolygonPropertiesEditor_19; + public static String PolygonPropertiesEditor_2; + public static String PolygonPropertiesEditor_20; + public static String PolygonPropertiesEditor_21; + public static String PolygonPropertiesEditor_22; + public static String PolygonPropertiesEditor_23; + public static String PolygonPropertiesEditor_24; + public static String PolygonPropertiesEditor_25; + public static String PolygonPropertiesEditor_26; + public static String PolygonPropertiesEditor_3; + public static String PolygonPropertiesEditor_4; + public static String PolygonPropertiesEditor_5; + public static String PolygonPropertiesEditor_6; + public static String PolygonPropertiesEditor_7; + public static String PolygonPropertiesEditor_8; + public static String PolygonPropertiesEditor_9; public static String PropertiesEditor_0; public static String PropertiesEditor_1; public static String SimpleLineEditorPage_0; @@ -85,6 +233,13 @@ public class Messages extends NLS { public static String SimplePolygonEditorPage_0; public static String SimplePolygonEditorPage_1; public static String SimplePolygonEditorPage_2; + public static String VendorOptions_1; + public static String VendorOptions_11; + public static String VendorOptions_13; + public static String VendorOptions_3; + public static String VendorOptions_5; + public static String VendorOptions_7; + public static String VendorOptions_9; static { // initialize resource bundle NLS.initializeMessages(BUNDLE_NAME, Messages.class); diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/internal/messages.properties b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/internal/messages.properties index d7ecf37..57f5312 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/internal/messages.properties +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/internal/messages.properties @@ -9,13 +9,23 @@ BoderParametersComposite_5=color BoderParametersComposite_6=graphics BoderParametersComposite_8=dash BoderParametersComposite_9=dash offset +CoverageColorEditor_10=alpha +CoverageColorEditor_2=Select all +CoverageColorEditor_3=Unselect all +CoverageColorEditor_4=Invert selection +CoverageColorEditor_5=reset colormap +CoverageColorEditor_6=Set from predefined table +CoverageColorEditor_7=Novalues to ignore +CoverageColorEditor_9=Add rules for novalues CoverageColorMaskStyleEditorPage_0=Color mask CoverageColorMaskStyleEditorPage_1=Enable color mask CoverageStyleEditorPage_0=No support for map styling of this type. CoverageStyleEditorPage_2=A problem occurred while creating the coverage style. CoverageStyleEditorPage_4=Opacity +FeatureTypeStyleWrapper_0=group FiltersComposite_0=Filter string FiltersComposite_3=Apply filter +FontEditor_0=set font GroupRulesTreeLabelProvider_0=default group GroupRulesTreeLabelProvider_1=default rule LineGeneralParametersComposite_0=Rule name @@ -68,6 +78,138 @@ LinePropertiesEditor_6=Add a new rule LinePropertiesEditor_7=Warning LinePropertiesEditor_8=Please select a group to which to add a new rule. LinePropertiesEditor_9=New Rule +PointBoderParametersComposite_0=enable/disable border +PointBoderParametersComposite_1=Manual +PointBoderParametersComposite_2=Field based +PointBoderParametersComposite_3=width +PointBoderParametersComposite_4=opacity +PointBoderParametersComposite_5=color +PointCharacterChooserComposite_0=Loading font icon +PointFillParametersComposite_0=enable/disable fill +PointFillParametersComposite_1=Manual +PointFillParametersComposite_2=Field based +PointFillParametersComposite_3=opacity +PointFillParametersComposite_4=color +PointGeneralParametersComposite_0=Rule name +PointGeneralParametersComposite_1=Manual +PointGeneralParametersComposite_2=Field based +PointGeneralParametersComposite_3=size +PointGeneralParametersComposite_4=rotation +PointGeneralParametersComposite_5=offset (x, y) +PointGeneralParametersComposite_6=maximum scale +PointGeneralParametersComposite_7=minimum scale +PointLabelsParametersComposite_0=enable/disable labelling +PointLabelsParametersComposite_1=Manual +PointLabelsParametersComposite_10=anchor +PointLabelsParametersComposite_11=displacement +PointLabelsParametersComposite_12=Vendor Options +PointLabelsParametersComposite_2=Field based +PointLabelsParametersComposite_3=label +PointLabelsParametersComposite_5=opacity +PointLabelsParametersComposite_6=rotation +PointLabelsParametersComposite_7=font +PointLabelsParametersComposite_8=font color +PointLabelsParametersComposite_9=halo +PointPropertiesComposite_0=Simple Style +PointPropertiesComposite_1=Graphics Based Style +PointPropertiesComposite_10=Border +PointPropertiesComposite_11=Fill +PointPropertiesComposite_12=Labels +PointPropertiesComposite_13=Filter +PointPropertiesComposite_14=Graphics path +PointPropertiesComposite_18=General properties +PointPropertiesComposite_19=Style Properties +PointPropertiesComposite_2=Font Based Style +PointPropertiesComposite_20=Symbol +PointPropertiesComposite_21=General +PointPropertiesComposite_22=Border +PointPropertiesComposite_23=Fill +PointPropertiesComposite_24=Labels +PointPropertiesComposite_25=Filter +PointPropertiesComposite_8=Style Properties +PointPropertiesComposite_9=General +PointPropertiesEditor_0=Preview, Groups and Rules +PointPropertiesEditor_1=Style list +PointPropertiesEditor_10=Delete the selected rule +PointPropertiesEditor_11=Warning +PointPropertiesEditor_12=No rule or group selected. +PointPropertiesEditor_13=Delete all rules +PointPropertiesEditor_14=Move group or rule up +PointPropertiesEditor_15=Move rule down +PointPropertiesEditor_16=Save selected rule as style +PointPropertiesEditor_17=Save all groups and rules as style +PointPropertiesEditor_18=New Style +PointPropertiesEditor_19=Style name +PointPropertiesEditor_2=No rule selected +PointPropertiesEditor_20=Please enter a name for the new style. Styles with same name are substituted. +PointPropertiesEditor_21=Remove selected style +PointPropertiesEditor_22=Load selected style into the rules list +PointPropertiesEditor_23=Import supported files to style +PointPropertiesEditor_24=One click style export for file based layers +PointPropertiesEditor_25=Warning +PointPropertiesEditor_26=The selected layer doesn't seem to be file based. +PointPropertiesEditor_27=Open the style library folder +PointPropertiesEditor_3=No rule selected +PointPropertiesEditor_4=Add a new group +PointPropertiesEditor_5=New Group +PointPropertiesEditor_6=Add a new rule +PointPropertiesEditor_7=Warning +PointPropertiesEditor_8=Please select a group to which to add a new rule. +PointPropertiesEditor_9=New Rule +PolygonFillParametersComposite_0=enable/disable fill +PolygonFillParametersComposite_1=color +PolygonFillParametersComposite_2=graphics +PolygonFillParametersComposite_3=well known mark +PolygonFillParametersComposite_4=Width +PolygonFillParametersComposite_5=Size +PolygonFillParametersComposite_6=Manual +PolygonFillParametersComposite_7=Field based +PolygonFillParametersComposite_8=opacity +PolygonGeneralParametersComposite_0=Rule name +PolygonGeneralParametersComposite_1=offset (x, y) +PolygonGeneralParametersComposite_2=maximum scale +PolygonGeneralParametersComposite_3=minimum scale +PolygonLabelsParametersComposite_0=enable/disable labelling +PolygonLabelsParametersComposite_1=label +PolygonLabelsParametersComposite_3=opacity +PolygonLabelsParametersComposite_4=rotation +PolygonLabelsParametersComposite_5=font +PolygonLabelsParametersComposite_6=font color +PolygonLabelsParametersComposite_7=halo +PolygonLabelsParametersComposite_8=Vendor Options +PolygonPropertiesComposite_1=Style Properties +PolygonPropertiesComposite_2=General +PolygonPropertiesComposite_3=Border +PolygonPropertiesComposite_4=Fill +PolygonPropertiesComposite_5=Labels +PolygonPropertiesComposite_6=Filter +PolygonPropertiesEditor_0=Rules list +PolygonPropertiesEditor_1=Style list +PolygonPropertiesEditor_10=Delete the selected rule +PolygonPropertiesEditor_11=Warning +PolygonPropertiesEditor_12=No rule or group selected. +PolygonPropertiesEditor_13=Delete all rules +PolygonPropertiesEditor_14=Move rule up +PolygonPropertiesEditor_15=Move rule down +PolygonPropertiesEditor_16=Save selected rule as style +PolygonPropertiesEditor_17=Save all rules as style +PolygonPropertiesEditor_18=New Style +PolygonPropertiesEditor_19=Style name +PolygonPropertiesEditor_2=No rule selected +PolygonPropertiesEditor_20=Please enter a name for the new style. Styles with same name are substituted. +PolygonPropertiesEditor_21=Remove selected style +PolygonPropertiesEditor_22=Load selected style into the rules list +PolygonPropertiesEditor_23=One click style export for file based layers +PolygonPropertiesEditor_24=Warning +PolygonPropertiesEditor_25=The selected layer doesn't seem to be file based. +PolygonPropertiesEditor_26=Open the style library folder +PolygonPropertiesEditor_3=No rule selected +PolygonPropertiesEditor_4=Add a new group +PolygonPropertiesEditor_5=New Group +PolygonPropertiesEditor_6=Add a new rule +PolygonPropertiesEditor_7=Warning +PolygonPropertiesEditor_8=Please select a group to which to add a new rule. +PolygonPropertiesEditor_9=New Rule PropertiesEditor_0=Warning PropertiesEditor_1=No rule or group selected. SimpleLineEditorPage_0=This editor works only for Line feature layers @@ -79,3 +221,10 @@ SimplePointEditorPage_2=You can't apply an empty style\! Resetting. SimplePolygonEditorPage_0=This editor works only for Polygon feature layers SimplePolygonEditorPage_1=Warning SimplePolygonEditorPage_2=You can't apply an empty style\! Resetting. +VendorOptions_1=max displacement pixels +VendorOptions_11=follow line +VendorOptions_13=other +VendorOptions_3=auto wrap pixels +VendorOptions_5=space around pixels +VendorOptions_7=repeat every pixels +VendorOptions_9=max angle allowed diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/PointPropertiesComposite.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/PointPropertiesComposite.java index a340f48..1fa1d9a 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/PointPropertiesComposite.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/PointPropertiesComposite.java @@ -37,6 +37,7 @@ import eu.udig.style.advanced.common.styleattributeclasses.PointSymbolizerWrappe import eu.udig.style.advanced.common.styleattributeclasses.RuleWrapper; import eu.udig.style.advanced.common.styleattributeclasses.SymbolizerWrapper; import eu.udig.style.advanced.common.styleattributeclasses.TextSymbolizerWrapper; +import eu.udig.style.advanced.internal.Messages; import eu.udig.style.advanced.points.widgets.PointBoderParametersComposite; import eu.udig.style.advanced.points.widgets.PointFillParametersComposite; import eu.udig.style.advanced.points.widgets.PointCharacterChooserComposite; @@ -48,9 +49,9 @@ import static eu.udig.style.advanced.utils.Utilities.*; @SuppressWarnings("nls") public class PointPropertiesComposite extends SelectionAdapter implements ModifyListener, IStyleChangesListener { - private static final String[] POINT_STYLE_TYPES = {"Simple Style", "Graphics Based Style", "Font Based Style"}; + private static final String[] POINT_STYLE_TYPES = {Messages.PointPropertiesComposite_0, Messages.PointPropertiesComposite_1, Messages.PointPropertiesComposite_2}; private static final String[] WK_MARK_NAMES = wkMarkNames; - private static final String TTF_PREFIX = "ttf://"; + private static final String TTF_PREFIX = "ttf://"; //$NON-NLS-1$ private RuleWrapper ruleWrapper; @@ -105,7 +106,7 @@ public class PointPropertiesComposite extends SelectionAdapter implements Modify public void setRule( RuleWrapper ruleWrapper ) { this.ruleWrapper = ruleWrapper; - System.out.println("setting rule: " + ruleWrapper.getName()); + System.out.println("setting rule: " + ruleWrapper.getName()); //$NON-NLS-1$ if (mainComposite == null) { init(); @@ -140,7 +141,7 @@ public class PointPropertiesComposite extends SelectionAdapter implements Modify try { graphicsPathText.setText(pointSymbolizerWrapper.getExternalGraphicPath()); } catch (MalformedURLException e) { - graphicsPathText.setText(""); + graphicsPathText.setText(""); //$NON-NLS-1$ } graphicsPathText.addModifyListener(this); } else if (markName != null && markName.toLowerCase().startsWith(TTF_PREFIX)) { @@ -209,8 +210,8 @@ public class PointPropertiesComposite extends SelectionAdapter implements Modify pointPropertiesEditor.refreshPreviewCanvasOnStyle(); } else if (selectionIndex == 1) { try { - URL iconUrl = Platform.getBundle(StylePlugin.PLUGIN_ID).getResource("icons/delete.png"); - String iconPath = ""; + URL iconUrl = Platform.getBundle(StylePlugin.PLUGIN_ID).getResource("icons/delete.png"); //$NON-NLS-1$ + String iconPath = ""; //$NON-NLS-1$ try { iconPath = FileLocator.toFileURL(iconUrl).getPath(); } catch (IOException ex) { @@ -304,7 +305,7 @@ public class PointPropertiesComposite extends SelectionAdapter implements Modify Group propertiesGroup = new Group(simplePointComposite, SWT.SHADOW_ETCHED_IN); propertiesGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); propertiesGroup.setLayout(new GridLayout(1, false)); - propertiesGroup.setText("Style Properties"); + propertiesGroup.setText(Messages.PointPropertiesComposite_8); TabFolder tabFolder = new TabFolder(propertiesGroup, SWT.BORDER); tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); @@ -315,7 +316,7 @@ public class PointPropertiesComposite extends SelectionAdapter implements Modify Composite generalParametersInternalComposite = generalParametersCompositeSIMPLE.getComposite(); TabItem tabItem1 = new TabItem(tabFolder, SWT.NULL); - tabItem1.setText("General"); + tabItem1.setText(Messages.PointPropertiesComposite_9); tabItem1.setControl(generalParametersInternalComposite); // BORDER GROUP @@ -325,7 +326,7 @@ public class PointPropertiesComposite extends SelectionAdapter implements Modify Composite borderParametersInternalComposite = borderParametersComposite.getComposite(); TabItem tabItem2 = new TabItem(tabFolder, SWT.NULL); - tabItem2.setText("Border "); + tabItem2.setText(Messages.PointPropertiesComposite_10); tabItem2.setControl(borderParametersInternalComposite); // Fill GROUP @@ -335,7 +336,7 @@ public class PointPropertiesComposite extends SelectionAdapter implements Modify Composite fillParametersInternalComposite = fillParametersComposite.getComposite(); TabItem tabItem3 = new TabItem(tabFolder, SWT.NULL); - tabItem3.setText("Fill "); + tabItem3.setText(Messages.PointPropertiesComposite_11); tabItem3.setControl(fillParametersInternalComposite); // Label GROUP @@ -345,7 +346,7 @@ public class PointPropertiesComposite extends SelectionAdapter implements Modify Composite labelParametersInternalComposite = labelsParametersComposite.getComposite(); TabItem tabItem4 = new TabItem(tabFolder, SWT.NULL); - tabItem4.setText("Labels "); + tabItem4.setText(Messages.PointPropertiesComposite_12); tabItem4.setControl(labelParametersInternalComposite); // Filter GROUP @@ -355,7 +356,7 @@ public class PointPropertiesComposite extends SelectionAdapter implements Modify Composite filtersInternalComposite = filtersComposite.getComposite(); TabItem tabItem5 = new TabItem(tabFolder, SWT.NULL); - tabItem5.setText("Filter "); + tabItem5.setText(Messages.PointPropertiesComposite_13); tabItem5.setControl(filtersInternalComposite); } @@ -376,24 +377,24 @@ public class PointPropertiesComposite extends SelectionAdapter implements Modify Group pathGroup = new Group(graphicsPointComposite, SWT.NONE); pathGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); pathGroup.setLayout(new GridLayout(2, false)); - pathGroup.setText("Graphics path"); + pathGroup.setText(Messages.PointPropertiesComposite_14); graphicsPathText = new Text(pathGroup, SWT.SINGLE | SWT.LEAD | SWT.BORDER); graphicsPathText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); try { graphicsPathText.setText(pointSymbolizerWrapper.getExternalGraphicPath()); } catch (MalformedURLException e1) { - graphicsPathText.setText(""); + graphicsPathText.setText(""); //$NON-NLS-1$ } graphicsPathText.addModifyListener(this); Button pathButton = new Button(pathGroup, SWT.PUSH); pathButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false)); - pathButton.setText("..."); + pathButton.setText("..."); //$NON-NLS-1$ pathButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter(){ public void widgetSelected( org.eclipse.swt.events.SelectionEvent e ) { FileDialog fileDialog = new FileDialog(graphicsPathText.getShell(), SWT.OPEN); String path = fileDialog.open(); if (path == null || path.length() < 1) { - graphicsPathText.setText(""); + graphicsPathText.setText(""); //$NON-NLS-1$ } else { graphicsPathText.setText(path); } @@ -404,7 +405,7 @@ public class PointPropertiesComposite extends SelectionAdapter implements Modify Group genericsGroup = new Group(graphicsPointComposite, SWT.NONE); genericsGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); genericsGroup.setLayout(new GridLayout(1, true)); - genericsGroup.setText("General properties"); + genericsGroup.setText(Messages.PointPropertiesComposite_18); generalParametersCompositeGRAPHICS = new PointGeneralParametersComposite(genericsGroup, numericAttributesArrays); generalParametersCompositeGRAPHICS.init(ruleWrapper); @@ -425,7 +426,7 @@ public class PointPropertiesComposite extends SelectionAdapter implements Modify Group propertiesGroup = new Group(fontPointComposite, SWT.SHADOW_ETCHED_IN); propertiesGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); propertiesGroup.setLayout(new GridLayout(1, false)); - propertiesGroup.setText("Style Properties"); + propertiesGroup.setText(Messages.PointPropertiesComposite_19); TabFolder tabFolder = new TabFolder(propertiesGroup, SWT.BORDER); tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1)); @@ -437,7 +438,7 @@ public class PointPropertiesComposite extends SelectionAdapter implements Modify Composite fontParametersInternalComposite = fontParametersComposite.getComposite(); TabItem tabItem1 = new TabItem(tabFolder, SWT.NULL); - tabItem1.setText("Symbol"); + tabItem1.setText(Messages.PointPropertiesComposite_20); tabItem1.setControl(fontParametersInternalComposite); generalParametersCompositeFONT = new PointGeneralParametersComposite(tabFolder, numericAttributesArrays); @@ -446,7 +447,7 @@ public class PointPropertiesComposite extends SelectionAdapter implements Modify Composite generalParametersInternalComposite = generalParametersCompositeFONT.getComposite(); TabItem tabItem2 = new TabItem(tabFolder, SWT.NULL); - tabItem2.setText("General"); + tabItem2.setText(Messages.PointPropertiesComposite_21); tabItem2.setControl(generalParametersInternalComposite); // BORDER GROUP @@ -456,7 +457,7 @@ public class PointPropertiesComposite extends SelectionAdapter implements Modify Composite borderParametersInternalComposite = fontBorderParametersComposite.getComposite(); TabItem tabItem3 = new TabItem(tabFolder, SWT.NULL); - tabItem3.setText("Border "); + tabItem3.setText(Messages.PointPropertiesComposite_22); tabItem3.setControl(borderParametersInternalComposite); // Fill GROUP @@ -466,7 +467,7 @@ public class PointPropertiesComposite extends SelectionAdapter implements Modify Composite fillParametersInternalComposite = fontFillParametersComposite.getComposite(); TabItem tabItem4 = new TabItem(tabFolder, SWT.NULL); - tabItem4.setText("Fill "); + tabItem4.setText(Messages.PointPropertiesComposite_23); tabItem4.setControl(fillParametersInternalComposite); // Label GROUP @@ -476,7 +477,7 @@ public class PointPropertiesComposite extends SelectionAdapter implements Modify Composite labelParametersInternalComposite = fontLabelsParametersComposite.getComposite(); TabItem tabItem5 = new TabItem(tabFolder, SWT.NULL); - tabItem5.setText("Labels "); + tabItem5.setText(Messages.PointPropertiesComposite_24); tabItem5.setControl(labelParametersInternalComposite); // Filter GROUP @@ -486,7 +487,7 @@ public class PointPropertiesComposite extends SelectionAdapter implements Modify Composite filtersInternalComposite = fontFiltersComposite.getComposite(); TabItem tabItem6 = new TabItem(tabFolder, SWT.NULL); - tabItem6.setText("Filter "); + tabItem6.setText(Messages.PointPropertiesComposite_25); tabItem6.setControl(filtersInternalComposite); } @@ -528,7 +529,7 @@ public class PointPropertiesComposite extends SelectionAdapter implements Modify private void setNewGraphicPath() throws MalformedURLException { String path = graphicsPathText.getText(); - if (! path.equals("")) + if (! path.equals("")) //$NON-NLS-1$ { PointSymbolizerWrapper pointSymbolizerWrapper = ruleWrapper.getGeometrySymbolizersWrapper().adapt( PointSymbolizerWrapper.class); diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/PointPropertiesEditor.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/PointPropertiesEditor.java index a57edab..954448f 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/PointPropertiesEditor.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/PointPropertiesEditor.java @@ -61,6 +61,7 @@ import eu.udig.style.advanced.common.styleattributeclasses.FeatureTypeStyleWrapp import eu.udig.style.advanced.common.styleattributeclasses.PointSymbolizerWrapper; import eu.udig.style.advanced.common.styleattributeclasses.RuleWrapper; import eu.udig.style.advanced.common.styleattributeclasses.StyleWrapper; +import eu.udig.style.advanced.internal.Messages; import eu.udig.style.advanced.utils.ImageCache; import eu.udig.style.advanced.utils.Utilities; @@ -104,7 +105,7 @@ public class PointPropertiesEditor extends PropertiesEditor { GridLayout rulesAndPreviewGroupLayout = new GridLayout(2, false); rulesAndPreviewGroupLayout.marginTop = 0; rulesAndPreviewGroup.setLayout(rulesAndPreviewGroupLayout); - rulesAndPreviewGroup.setText("Preview, Groups and Rules"); + rulesAndPreviewGroup.setText(Messages.PointPropertiesEditor_0); Composite canvasComposite = new Composite(rulesAndPreviewGroup, SWT.NONE); canvasComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); @@ -148,7 +149,7 @@ public class PointPropertiesEditor extends PropertiesEditor { GridData styleViewerGroupGD = new GridData(SWT.FILL, SWT.FILL, true, true); styleViewerGroup.setLayoutData(styleViewerGroupGD); styleViewerGroup.setLayout(new GridLayout(10, false)); - styleViewerGroup.setText("Style list"); + styleViewerGroup.setText(Messages.PointPropertiesEditor_1); Composite styleManagerComposite = new Composite(styleViewerGroup, SWT.NONE); GridData styleManagerCompositeGD = new GridData(SWT.FILL, SWT.FILL, true, true); @@ -180,7 +181,7 @@ public class PointPropertiesEditor extends PropertiesEditor { } else { // if it came here, nothing to select Label l = new Label(propertiesComposite, SWT.SHADOW_ETCHED_IN); - l.setText("No rule selected"); + l.setText(Messages.PointPropertiesEditor_2); propertiesStackLayout.topControl = l; } @@ -241,7 +242,7 @@ public class PointPropertiesEditor extends PropertiesEditor { private void showEmptyLabel() { Label emptyLabel = new Label(propertiesComposite, SWT.NONE); emptyLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true)); - emptyLabel.setText("No rule selected"); + emptyLabel.setText(Messages.PointPropertiesEditor_3); propertiesStackLayout.topControl = emptyLabel; propertiesComposite.layout(); } @@ -261,13 +262,13 @@ public class PointPropertiesEditor extends PropertiesEditor { final Button addGroupButton = new Button(rulesGroup, SWT.PUSH); addGroupButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); addGroupButton.setImage(addGroupImg); - addGroupButton.setToolTipText("Add a new group"); + addGroupButton.setToolTipText(Messages.PointPropertiesEditor_4); addGroupButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { FeatureTypeStyle featureTypeStyle = Utilities.sf.createFeatureTypeStyle(); FeatureTypeStyleWrapper addedFeatureTypeStyle = styleWrapper.addFeatureTypeStyle(featureTypeStyle); - String tmpName = "New Group"; + String tmpName = Messages.PointPropertiesEditor_5; tmpName = Utilities.checkSameNameFeatureTypeStyle(styleWrapper.getFeatureTypeStylesWrapperList(), tmpName); addedFeatureTypeStyle.setName(tmpName); @@ -279,7 +280,7 @@ public class PointPropertiesEditor extends PropertiesEditor { final Button addButton = new Button(rulesGroup, SWT.PUSH); addButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); addButton.setImage(addImg); - addButton.setToolTipText("Add a new rule"); + addButton.setToolTipText(Messages.PointPropertiesEditor_6); addButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { FeatureTypeStyleWrapper selectedFtsw = getSelectedFtsw(); @@ -290,12 +291,12 @@ public class PointPropertiesEditor extends PropertiesEditor { } } if (selectedFtsw == null) { - MessageDialog.openWarning(addButton.getShell(), "Warning", - "Please select a group to which to add a new rule."); + MessageDialog.openWarning(addButton.getShell(), Messages.PointPropertiesEditor_7, + Messages.PointPropertiesEditor_8); return; } RuleWrapper addedRuleWrapper = selectedFtsw.addRule(null, PointSymbolizerWrapper.class); - String tmpName = "New Rule"; + String tmpName = Messages.PointPropertiesEditor_9; tmpName = Utilities.checkSameNameRule(addedRuleWrapper.getParent().getRulesWrapperList(), tmpName); addedRuleWrapper.setName(tmpName); @@ -308,7 +309,7 @@ public class PointPropertiesEditor extends PropertiesEditor { Button deleteButton = new Button(rulesGroup, SWT.PUSH); deleteButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); deleteButton.setImage(delImg); - deleteButton.setToolTipText("Delete the selected rule"); + deleteButton.setToolTipText(Messages.PointPropertiesEditor_10); deleteButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { FeatureTypeStyleWrapper selectedFtsw = getSelectedFtsw(); @@ -318,7 +319,7 @@ public class PointPropertiesEditor extends PropertiesEditor { } else if (selectedRule != null) { selectedRule.getParent().removeRule(selectedRule); } else { - MessageDialog.openWarning(addButton.getShell(), "Warning", "No rule or group selected."); + MessageDialog.openWarning(addButton.getShell(), Messages.PointPropertiesEditor_11, Messages.PointPropertiesEditor_12); return; } @@ -330,7 +331,7 @@ public class PointPropertiesEditor extends PropertiesEditor { Button deleteAllButton = new Button(rulesGroup, SWT.PUSH); deleteAllButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); deleteAllButton.setImage(delAllImg); - deleteAllButton.setToolTipText("Delete all rules"); + deleteAllButton.setToolTipText(Messages.PointPropertiesEditor_13); deleteAllButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { styleWrapper.clear(); @@ -342,7 +343,7 @@ public class PointPropertiesEditor extends PropertiesEditor { Button upButton = new Button(rulesGroup, SWT.PUSH); upButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); upButton.setImage(upImg); - upButton.setToolTipText("Move group or rule up"); + upButton.setToolTipText(Messages.PointPropertiesEditor_14); upButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { swap(true); @@ -353,7 +354,7 @@ public class PointPropertiesEditor extends PropertiesEditor { Button downButton = new Button(rulesGroup, SWT.PUSH); downButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); downButton.setImage(downImg); - downButton.setToolTipText("Move rule down"); + downButton.setToolTipText(Messages.PointPropertiesEditor_15); downButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { swap(false); @@ -375,7 +376,7 @@ public class PointPropertiesEditor extends PropertiesEditor { final Button saveButton = new Button(rulesGroup, SWT.PUSH); saveButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); saveButton.setImage(saveImg); - saveButton.setToolTipText("Save selected rule as style"); + saveButton.setToolTipText(Messages.PointPropertiesEditor_16); saveButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { RuleWrapper selectedRule = getSelectedRule(); @@ -397,12 +398,12 @@ public class PointPropertiesEditor extends PropertiesEditor { final Button saveAllButton = new Button(rulesGroup, SWT.PUSH); saveAllButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); saveAllButton.setImage(saveAllImg); - saveAllButton.setToolTipText("Save all groups and rules as style"); + saveAllButton.setToolTipText(Messages.PointPropertiesEditor_17); saveAllButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { - String newStyleName = "New Style"; - InputDialog iDialog = new InputDialog(saveAllButton.getShell(), "Style name", - "Please enter a name for the new style. Styles with same name are substituted.", newStyleName, null); + String newStyleName = Messages.PointPropertiesEditor_18; + InputDialog iDialog = new InputDialog(saveAllButton.getShell(), Messages.PointPropertiesEditor_19, + Messages.PointPropertiesEditor_20, newStyleName, null); iDialog.setBlockOnOpen(true); int open = iDialog.open(); if (open == SWT.CANCEL) { @@ -425,7 +426,7 @@ public class PointPropertiesEditor extends PropertiesEditor { Button deleteButton = new Button(rulesGroup, SWT.PUSH); deleteButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); deleteButton.setImage(delImg); - deleteButton.setToolTipText("Remove selected style"); + deleteButton.setToolTipText(Messages.PointPropertiesEditor_21); deleteButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { StyleWrapper styleWrapper = pointStyleManager.getCurrentSelectedStyle(); @@ -443,7 +444,7 @@ public class PointPropertiesEditor extends PropertiesEditor { Button loadButton = new Button(rulesGroup, SWT.PUSH); loadButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); loadButton.setImage(loadImg); - loadButton.setToolTipText("Load selected style into the rules list"); + loadButton.setToolTipText(Messages.PointPropertiesEditor_22); loadButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { StyleWrapper styleWrapperToLoad = pointStyleManager.getCurrentSelectedStyle(); @@ -464,7 +465,7 @@ public class PointPropertiesEditor extends PropertiesEditor { final Button importButton = new Button(rulesGroup, SWT.PUSH); importButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); importButton.setImage(importImg); - importButton.setToolTipText("Import supported files to style"); + importButton.setToolTipText(Messages.PointPropertiesEditor_23); importButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { FileDialog fileDialog = new FileDialog(importButton.getShell(), SWT.OPEN | SWT.MULTI); @@ -493,7 +494,7 @@ public class PointPropertiesEditor extends PropertiesEditor { final Button exportButton = new Button(rulesGroup, SWT.PUSH); exportButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); exportButton.setImage(exportImg); - exportButton.setToolTipText("One click style export for file based layers"); + exportButton.setToolTipText(Messages.PointPropertiesEditor_24); exportButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { IGeoResource geoResource = layer.getGeoResource(); @@ -506,8 +507,8 @@ public class PointPropertiesEditor extends PropertiesEditor { e1.printStackTrace(); } } else { - MessageDialog.openWarning(exportButton.getShell(), "Warning", - "The selected layer doesn't seem to be file based."); + MessageDialog.openWarning(exportButton.getShell(), Messages.PointPropertiesEditor_25, + Messages.PointPropertiesEditor_26); } } }); @@ -515,7 +516,7 @@ public class PointPropertiesEditor extends PropertiesEditor { final Button openFolderButton = new Button(rulesGroup, SWT.PUSH); openFolderButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); openFolderButton.setImage(openImg); - openFolderButton.setToolTipText("Open the style library folder"); + openFolderButton.setToolTipText(Messages.PointPropertiesEditor_27); openFolderButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { File pointStyleFolderFile = pointStyleManager.getStyleFolderFile(); diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/widgets/PointBoderParametersComposite.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/widgets/PointBoderParametersComposite.java index 77fe6d2..f5c5d8e 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/widgets/PointBoderParametersComposite.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/widgets/PointBoderParametersComposite.java @@ -36,6 +36,7 @@ import eu.udig.style.advanced.common.ParameterComposite; import eu.udig.style.advanced.common.IStyleChangesListener.STYLEEVENTTYPE; import eu.udig.style.advanced.common.styleattributeclasses.PointSymbolizerWrapper; import eu.udig.style.advanced.common.styleattributeclasses.RuleWrapper; +import eu.udig.style.advanced.internal.Messages; import eu.udig.style.advanced.utils.StolenColorEditor; /** @@ -87,7 +88,7 @@ public class PointBoderParametersComposite extends ParameterComposite { GridData borderEnableButtonGD = new GridData(SWT.BEGINNING, SWT.CENTER, false, false); borderEnableButtonGD.horizontalSpan = 3; borderEnableButton.setLayoutData(borderEnableButtonGD); - borderEnableButton.setText("enable/disable border"); + borderEnableButton.setText(Messages.PointBoderParametersComposite_0); borderEnableButton.setSelection(widgetEnabled); borderEnableButton.addSelectionListener(this); @@ -95,15 +96,15 @@ public class PointBoderParametersComposite extends ParameterComposite { new Label(mainComposite, SWT.NONE); Label valueLabel = new Label(mainComposite, SWT.NONE); valueLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false)); - valueLabel.setText("Manual"); + valueLabel.setText(Messages.PointBoderParametersComposite_1); Label fieldsLabel = new Label(mainComposite, SWT.NONE); fieldsLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false)); - fieldsLabel.setText("Field based"); + fieldsLabel.setText(Messages.PointBoderParametersComposite_2); // border width Label borderWidthLabel = new Label(mainComposite, SWT.NONE); borderWidthLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - borderWidthLabel.setText("width"); + borderWidthLabel.setText(Messages.PointBoderParametersComposite_3); borderWidthSpinner = new Spinner(mainComposite, SWT.BORDER); borderWidthSpinner.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); borderWidthSpinner.setMaximum(500); @@ -134,7 +135,7 @@ public class PointBoderParametersComposite extends ParameterComposite { // border alpha Label borderOpactityLabel = new Label(mainComposite, SWT.NONE); borderOpactityLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - borderOpactityLabel.setText("opacity"); + borderOpactityLabel.setText(Messages.PointBoderParametersComposite_4); borderOpacitySpinner = new Spinner(mainComposite, SWT.BORDER); borderOpacitySpinner.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); borderOpacitySpinner.setMaximum(100); @@ -163,7 +164,7 @@ public class PointBoderParametersComposite extends ParameterComposite { // border color Label borderColorLabel = new Label(mainComposite, SWT.NONE); borderColorLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - borderColorLabel.setText("color"); + borderColorLabel.setText(Messages.PointBoderParametersComposite_5); Color tmpColor; try { tmpColor = Color.decode(symbolizersWrapper.getStrokeColor()); diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/widgets/PointCharacterChooserComposite.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/widgets/PointCharacterChooserComposite.java index 86801bf..b8c69ee 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/widgets/PointCharacterChooserComposite.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/widgets/PointCharacterChooserComposite.java @@ -40,6 +40,7 @@ import eu.udig.style.advanced.common.ParameterComposite; import eu.udig.style.advanced.common.IStyleChangesListener.STYLEEVENTTYPE; import eu.udig.style.advanced.common.styleattributeclasses.PointSymbolizerWrapper; import eu.udig.style.advanced.common.styleattributeclasses.RuleWrapper; +import eu.udig.style.advanced.internal.Messages; /** * A composite that holds widgets for font and character selection. @@ -142,7 +143,7 @@ public class PointCharacterChooserComposite extends ParameterComposite implement item.setText(0,"..."); //$NON-NLS-1$ - Job load = new Job("Loading font icon") { + Job load = new Job(Messages.PointCharacterChooserComposite_0) { @Override protected IStatus run(IProgressMonitor monitor) { diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/widgets/PointFillParametersComposite.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/widgets/PointFillParametersComposite.java index 63e025c..51704bb 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/widgets/PointFillParametersComposite.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/widgets/PointFillParametersComposite.java @@ -36,6 +36,7 @@ import eu.udig.style.advanced.common.ParameterComposite; import eu.udig.style.advanced.common.IStyleChangesListener.STYLEEVENTTYPE; import eu.udig.style.advanced.common.styleattributeclasses.PointSymbolizerWrapper; import eu.udig.style.advanced.common.styleattributeclasses.RuleWrapper; +import eu.udig.style.advanced.internal.Messages; import eu.udig.style.advanced.utils.StolenColorEditor; /** @@ -84,7 +85,7 @@ public class PointFillParametersComposite extends ParameterComposite { GridData fillEnableButtonGD = new GridData(SWT.BEGINNING, SWT.CENTER, false, false); fillEnableButtonGD.horizontalSpan = 3; fillEnableButton.setLayoutData(fillEnableButtonGD); - fillEnableButton.setText("enable/disable fill"); + fillEnableButton.setText(Messages.PointFillParametersComposite_0); fillEnableButton.setSelection(widgetEnabled); fillEnableButton.addSelectionListener(this); @@ -92,15 +93,15 @@ public class PointFillParametersComposite extends ParameterComposite { new Label(mainComposite, SWT.NONE); Label valueLabel = new Label(mainComposite, SWT.NONE); valueLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false)); - valueLabel.setText("Manual"); + valueLabel.setText(Messages.PointFillParametersComposite_1); Label fieldsLabel = new Label(mainComposite, SWT.NONE); fieldsLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false)); - fieldsLabel.setText("Field based"); + fieldsLabel.setText(Messages.PointFillParametersComposite_2); // border alpha Label fillOpactityLabel = new Label(mainComposite, SWT.NONE); fillOpactityLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - fillOpactityLabel.setText("opacity"); + fillOpactityLabel.setText(Messages.PointFillParametersComposite_3); fillOpacitySpinner = new Spinner(mainComposite, SWT.BORDER); fillOpacitySpinner.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); fillOpacitySpinner.setMaximum(100); @@ -129,7 +130,7 @@ public class PointFillParametersComposite extends ParameterComposite { // fill color Label fillColorLabel = new Label(mainComposite, SWT.NONE); fillColorLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - fillColorLabel.setText("color"); + fillColorLabel.setText(Messages.PointFillParametersComposite_4); Color tmpColor = null;; try { tmpColor = Color.decode(pointSymbolizerWrapper.getFillColor()); diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/widgets/PointGeneralParametersComposite.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/widgets/PointGeneralParametersComposite.java index a5f9cc6..a6c2624 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/widgets/PointGeneralParametersComposite.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/widgets/PointGeneralParametersComposite.java @@ -33,6 +33,7 @@ import eu.udig.style.advanced.common.IStyleChangesListener.STYLEEVENTTYPE; import eu.udig.style.advanced.common.ParameterComposite; import eu.udig.style.advanced.common.styleattributeclasses.PointSymbolizerWrapper; import eu.udig.style.advanced.common.styleattributeclasses.RuleWrapper; +import eu.udig.style.advanced.internal.Messages; import eu.udig.style.advanced.utils.Utilities; /** @@ -77,7 +78,7 @@ public class PointGeneralParametersComposite extends ParameterComposite { // rule name Label nameLabel = new Label(mainComposite, SWT.NONE); nameLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false)); - nameLabel.setText("Rule name"); + nameLabel.setText(Messages.PointGeneralParametersComposite_0); nameText = new Text(mainComposite, SWT.SINGLE | SWT.LEAD | SWT.BORDER); GridData nameTextGD = new GridData(SWT.FILL, SWT.CENTER, true, false); nameTextGD.horizontalSpan = 2; @@ -89,15 +90,15 @@ public class PointGeneralParametersComposite extends ParameterComposite { new Label(mainComposite, SWT.NONE); Label valueLabel = new Label(mainComposite, SWT.NONE); valueLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false)); - valueLabel.setText("Manual"); + valueLabel.setText(Messages.PointGeneralParametersComposite_1); Label fieldsLabel = new Label(mainComposite, SWT.NONE); fieldsLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false)); - fieldsLabel.setText("Field based"); + fieldsLabel.setText(Messages.PointGeneralParametersComposite_2); // size Label sizeLabel = new Label(mainComposite, SWT.NONE); sizeLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - sizeLabel.setText("size"); + sizeLabel.setText(Messages.PointGeneralParametersComposite_3); sizeSpinner = new Spinner(mainComposite, SWT.BORDER); sizeSpinner.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); sizeSpinner.setMaximum(200); @@ -124,7 +125,7 @@ public class PointGeneralParametersComposite extends ParameterComposite { Label rotationLabel = new Label(mainComposite, SWT.NONE); rotationLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - rotationLabel.setText("rotation"); + rotationLabel.setText(Messages.PointGeneralParametersComposite_4); rotationSpinner = new Spinner(mainComposite, SWT.BORDER); rotationSpinner.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); rotationSpinner.setMaximum(360); @@ -153,7 +154,7 @@ public class PointGeneralParametersComposite extends ParameterComposite { Label offsetLabel = new Label(mainComposite, SWT.NONE); GridData offsetLabelGD = new GridData(SWT.FILL, SWT.CENTER, true, false); offsetLabel.setLayoutData(offsetLabelGD); - offsetLabel.setText("offset (x, y)"); + offsetLabel.setText(Messages.PointGeneralParametersComposite_5); String xOffset = pointSymbolizerWrapper.getxOffset(); String yOffset = pointSymbolizerWrapper.getyOffset(); @@ -185,7 +186,7 @@ public class PointGeneralParametersComposite extends ParameterComposite { Label maxScaleLabel = new Label(mainComposite, SWT.NONE); GridData maxScaleLabelGD = new GridData(SWT.FILL, SWT.CENTER, true, false); maxScaleLabel.setLayoutData(maxScaleLabelGD); - maxScaleLabel.setText("maximum scale"); + maxScaleLabel.setText(Messages.PointGeneralParametersComposite_6); maxScaleText = new Text(mainComposite, SWT.SINGLE | SWT.LEAD | SWT.BORDER); GridData maxScaleTextSIMPLEGD = new GridData(SWT.FILL, SWT.CENTER, true, false); maxScaleTextSIMPLEGD.horizontalSpan = 2; @@ -196,7 +197,7 @@ public class PointGeneralParametersComposite extends ParameterComposite { Label minScaleLabel = new Label(mainComposite, SWT.NONE); GridData minScaleLabelGD = new GridData(SWT.FILL, SWT.CENTER, true, false); minScaleLabel.setLayoutData(minScaleLabelGD); - minScaleLabel.setText("minimum scale"); + minScaleLabel.setText(Messages.PointGeneralParametersComposite_7); minScaleText = new Text(mainComposite, SWT.SINGLE | SWT.LEAD | SWT.BORDER); GridData mainScaleTextSIMPLEGD = new GridData(SWT.FILL, SWT.CENTER, true, false); mainScaleTextSIMPLEGD.horizontalSpan = 2; @@ -257,13 +258,13 @@ public class PointGeneralParametersComposite extends ParameterComposite { // scale Double maxScaleDouble = isDouble(ruleWrapper.getMaxScale()); if (maxScaleDouble == null || Double.isInfinite(maxScaleDouble)) { - maxScaleText.setText(""); + maxScaleText.setText(""); //$NON-NLS-1$ } else { maxScaleText.setText(String.valueOf(maxScaleDouble)); } Double minScaleDouble = isDouble(ruleWrapper.getMinScale()); if (minScaleDouble == null || minScaleDouble == 0) { - minScaleText.setText(""); + minScaleText.setText(""); //$NON-NLS-1$ } else { minScaleText.setText(String.valueOf(minScaleDouble)); } @@ -305,7 +306,7 @@ public class PointGeneralParametersComposite extends ParameterComposite { double x = Utilities.getDoubleSpinnerSelection(xOffsetSpinner); double y = Utilities.getDoubleSpinnerSelection(yOffsetSpinner); - String offsetStr = x + "," + y; + String offsetStr = x + "," + y; //$NON-NLS-1$ notifyListeners(offsetStr, false, STYLEEVENTTYPE.OFFSET); } checkEnablements(); diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/widgets/PointLabelsParametersComposite.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/widgets/PointLabelsParametersComposite.java index 9192cad..0f1c08c 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/widgets/PointLabelsParametersComposite.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/points/widgets/PointLabelsParametersComposite.java @@ -43,6 +43,7 @@ import eu.udig.style.advanced.common.IStyleChangesListener.STYLEEVENTTYPE; import eu.udig.style.advanced.common.ParameterComposite; import eu.udig.style.advanced.common.styleattributeclasses.RuleWrapper; import eu.udig.style.advanced.common.styleattributeclasses.TextSymbolizerWrapper; +import eu.udig.style.advanced.internal.Messages; import eu.udig.style.advanced.utils.Alignments; import eu.udig.style.advanced.utils.FontEditor; import eu.udig.style.advanced.utils.StolenColorEditor; @@ -118,7 +119,7 @@ public class PointLabelsParametersComposite extends ParameterComposite { GridData labelEnableButtonGD = new GridData(SWT.BEGINNING, SWT.CENTER, false, false); labelEnableButtonGD.horizontalSpan = 3; labelEnableButton.setLayoutData(labelEnableButtonGD); - labelEnableButton.setText("enable/disable labelling"); + labelEnableButton.setText(Messages.PointLabelsParametersComposite_0); labelEnableButton.setSelection(widgetEnabled); labelEnableButton.addSelectionListener(this); @@ -126,15 +127,15 @@ public class PointLabelsParametersComposite extends ParameterComposite { new Label(mainComposite, SWT.NONE); Label valueLabel = new Label(mainComposite, SWT.NONE); valueLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false)); - valueLabel.setText("Manual"); + valueLabel.setText(Messages.PointLabelsParametersComposite_1); Label fieldsLabel = new Label(mainComposite, SWT.NONE); fieldsLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false)); - fieldsLabel.setText("Field based"); + fieldsLabel.setText(Messages.PointLabelsParametersComposite_2); // label name Label labelNameLabel = new Label(mainComposite, SWT.NONE); labelNameLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - labelNameLabel.setText("label"); + labelNameLabel.setText(Messages.PointLabelsParametersComposite_3); labelNameText = new Text(mainComposite, SWT.SINGLE | SWT.LEAD | SWT.BORDER); GridData labelNameTextGD = new GridData(SWT.FILL, SWT.CENTER, true, false); @@ -155,13 +156,13 @@ public class PointLabelsParametersComposite extends ParameterComposite { labelNameText.setText(labelName); } } else { - labelNameText.setText(""); + labelNameText.setText(""); //$NON-NLS-1$ } // label alpha Label labelOpactityLabel = new Label(mainComposite, SWT.NONE); labelOpactityLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - labelOpactityLabel.setText("opacity"); + labelOpactityLabel.setText(Messages.PointLabelsParametersComposite_5); labelOpacitySpinner = new Spinner(mainComposite, SWT.BORDER); labelOpacitySpinner.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); labelOpacitySpinner.setMaximum(100); @@ -190,7 +191,7 @@ public class PointLabelsParametersComposite extends ParameterComposite { // rotation Label rotationLabel = new Label(mainComposite, SWT.NONE); rotationLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - rotationLabel.setText("rotation"); + rotationLabel.setText(Messages.PointLabelsParametersComposite_6); rotationSpinner = new Spinner(mainComposite, SWT.BORDER); rotationSpinner.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); rotationSpinner.setMaximum(360); @@ -219,7 +220,7 @@ public class PointLabelsParametersComposite extends ParameterComposite { // font Label fontLabel = new Label(mainComposite, SWT.NONE); fontLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - fontLabel.setText("font"); + fontLabel.setText(Messages.PointLabelsParametersComposite_7); fontEditor = new FontEditor(mainComposite); GridData fontButtonGD = new GridData(SWT.FILL, SWT.FILL, true, false); @@ -236,7 +237,7 @@ public class PointLabelsParametersComposite extends ParameterComposite { // font color Label fontColorLabel = new Label(mainComposite, SWT.NONE); fontColorLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - fontColorLabel.setText("font color"); + fontColorLabel.setText(Messages.PointLabelsParametersComposite_8); fontColorEditor = new StolenColorEditor(mainComposite, this); fontColorButton = fontColorEditor.getButton(); @@ -254,7 +255,7 @@ public class PointLabelsParametersComposite extends ParameterComposite { // label halo Label haloLabel = new Label(mainComposite, SWT.NONE); haloLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - haloLabel.setText("halo"); + haloLabel.setText(Messages.PointLabelsParametersComposite_9); haloColorEditor = new StolenColorEditor(mainComposite, this); haloColorButton = haloColorEditor.getButton(); @@ -285,7 +286,7 @@ public class PointLabelsParametersComposite extends ParameterComposite { // anchor Label anchorLabel = new Label(mainComposite, SWT.NONE); anchorLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - anchorLabel.setText("anchor"); + anchorLabel.setText(Messages.PointLabelsParametersComposite_10); anchorVerticalCombo = new Combo(mainComposite, SWT.DROP_DOWN | SWT.READ_ONLY); anchorVerticalCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); @@ -306,7 +307,7 @@ public class PointLabelsParametersComposite extends ParameterComposite { // displacement Label displacementLabel = new Label(mainComposite, SWT.NONE); displacementLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - displacementLabel.setText("displacement"); + displacementLabel.setText(Messages.PointLabelsParametersComposite_11); String displacementX = textSymbolizerWrapper.getDisplacementX(); String displacementY = textSymbolizerWrapper.getDisplacementY(); @@ -340,7 +341,7 @@ public class PointLabelsParametersComposite extends ParameterComposite { vendorOptionsGD.horizontalSpan = 3; vendorOptionsGroup.setLayoutData(vendorOptionsGD); vendorOptionsGroup.setLayout(new GridLayout(2, false)); - vendorOptionsGroup.setText("Vendor Options"); + vendorOptionsGroup.setText(Messages.PointLabelsParametersComposite_12); // max displacement Label maxDisplacementLabel = new Label(vendorOptionsGroup, SWT.NONE); @@ -354,7 +355,7 @@ public class PointLabelsParametersComposite extends ParameterComposite { if (maxDisplacementVO != null) { maxDisplacementText.setText(maxDisplacementVO); } else { - maxDisplacementText.setText(""); + maxDisplacementText.setText(""); //$NON-NLS-1$ } // autoWrap @@ -369,7 +370,7 @@ public class PointLabelsParametersComposite extends ParameterComposite { if (autoWrapVO != null) { autoWrapText.setText(autoWrapVO); } else { - autoWrapText.setText(""); + autoWrapText.setText(""); //$NON-NLS-1$ } // spaceAround @@ -384,7 +385,7 @@ public class PointLabelsParametersComposite extends ParameterComposite { if (spaceAroundVO != null) { spaceAroundText.setText(spaceAroundVO); } else { - spaceAroundText.setText(""); + spaceAroundText.setText(""); //$NON-NLS-1$ } checkEnablements(); @@ -413,7 +414,7 @@ public class PointLabelsParametersComposite extends ParameterComposite { labelNameText.setText(labelName); } } else { - labelNameText.setText(""); + labelNameText.setText(""); //$NON-NLS-1$ } FontData[] fontData = textSymbolizerWrapper.getFontData(); @@ -497,7 +498,7 @@ public class PointLabelsParametersComposite extends ParameterComposite { if (maxDisplacementVO != null) { maxDisplacementText.setText(maxDisplacementVO); } else { - maxDisplacementText.setText(""); + maxDisplacementText.setText(""); //$NON-NLS-1$ } // autoWrap @@ -505,7 +506,7 @@ public class PointLabelsParametersComposite extends ParameterComposite { if (autoWrapVO != null) { autoWrapText.setText(autoWrapVO); } else { - autoWrapText.setText(""); + autoWrapText.setText(""); //$NON-NLS-1$ } // spaceAround @@ -513,7 +514,7 @@ public class PointLabelsParametersComposite extends ParameterComposite { if (spaceAroundVO != null) { spaceAroundText.setText(spaceAroundVO); } else { - spaceAroundText.setText(""); + spaceAroundText.setText(""); //$NON-NLS-1$ } checkEnablements(); diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/polygons/PolygonPropertiesComposite.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/polygons/PolygonPropertiesComposite.java index 9db1fa9..04d4cbb 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/polygons/PolygonPropertiesComposite.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/polygons/PolygonPropertiesComposite.java @@ -46,6 +46,7 @@ import eu.udig.style.advanced.common.IStyleChangesListener; import eu.udig.style.advanced.common.styleattributeclasses.PolygonSymbolizerWrapper; import eu.udig.style.advanced.common.styleattributeclasses.RuleWrapper; import eu.udig.style.advanced.common.styleattributeclasses.TextSymbolizerWrapper; +import eu.udig.style.advanced.internal.Messages; import eu.udig.style.advanced.polygons.widgets.PolygonFillParametersComposite; import eu.udig.style.advanced.polygons.widgets.PolygonGeneralParametersComposite; import eu.udig.style.advanced.polygons.widgets.PolygonLabelsParametersComposite; @@ -94,7 +95,7 @@ public class PolygonPropertiesComposite implements ModifyListener, IStyleChanges public void setRule( RuleWrapper ruleWrapper ) { this.ruleWrapper = ruleWrapper; - System.out.println("setting rule: " + ruleWrapper.getName()); + System.out.println("setting rule: " + ruleWrapper.getName()); //$NON-NLS-1$ if (mainComposite == null) { init(); @@ -161,7 +162,7 @@ public class PolygonPropertiesComposite implements ModifyListener, IStyleChanges Group propertiesGroup = new Group(simplePolygonComposite, SWT.SHADOW_ETCHED_IN); propertiesGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); propertiesGroup.setLayout(new GridLayout(1, false)); - propertiesGroup.setText("Style Properties"); + propertiesGroup.setText(Messages.PolygonPropertiesComposite_1); TabFolder tabFolder = new TabFolder(propertiesGroup, SWT.BORDER); tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); @@ -172,7 +173,7 @@ public class PolygonPropertiesComposite implements ModifyListener, IStyleChanges Composite generalParametersInternalComposite = generalParametersComposite.getComposite(); TabItem tabItem1 = new TabItem(tabFolder, SWT.NULL); - tabItem1.setText("General"); + tabItem1.setText(Messages.PolygonPropertiesComposite_2); tabItem1.setControl(generalParametersInternalComposite); // BORDER GROUP @@ -182,7 +183,7 @@ public class PolygonPropertiesComposite implements ModifyListener, IStyleChanges Composite borderParametersInternalComposite = borderParametersComposite.getComposite(); TabItem tabItem2 = new TabItem(tabFolder, SWT.NULL); - tabItem2.setText("Border "); + tabItem2.setText(Messages.PolygonPropertiesComposite_3); tabItem2.setControl(borderParametersInternalComposite); // Fill GROUP @@ -192,7 +193,7 @@ public class PolygonPropertiesComposite implements ModifyListener, IStyleChanges Composite fillParametersInternalComposite = fillParametersComposite.getComposite(); TabItem tabItem3 = new TabItem(tabFolder, SWT.NULL); - tabItem3.setText("Fill "); + tabItem3.setText(Messages.PolygonPropertiesComposite_4); tabItem3.setControl(fillParametersInternalComposite); // Label GROUP @@ -202,7 +203,7 @@ public class PolygonPropertiesComposite implements ModifyListener, IStyleChanges Composite labelParametersInternalComposite = labelsParametersComposite.getComposite(); TabItem tabItem4 = new TabItem(tabFolder, SWT.NULL); - tabItem4.setText("Labels "); + tabItem4.setText(Messages.PolygonPropertiesComposite_5); tabItem4.setControl(labelParametersInternalComposite); // Filter GROUP @@ -212,7 +213,7 @@ public class PolygonPropertiesComposite implements ModifyListener, IStyleChanges Composite filtersInternalComposite = filtersComposite.getComposite(); TabItem tabItem5 = new TabItem(tabFolder, SWT.NULL); - tabItem5.setText("Filter "); + tabItem5.setText(Messages.PolygonPropertiesComposite_6); tabItem5.setControl(filtersInternalComposite); } diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/polygons/PolygonPropertiesEditor.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/polygons/PolygonPropertiesEditor.java index dcdd45f..d330239 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/polygons/PolygonPropertiesEditor.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/polygons/PolygonPropertiesEditor.java @@ -60,6 +60,7 @@ import eu.udig.style.advanced.common.styleattributeclasses.FeatureTypeStyleWrapp import eu.udig.style.advanced.common.styleattributeclasses.PolygonSymbolizerWrapper; import eu.udig.style.advanced.common.styleattributeclasses.RuleWrapper; import eu.udig.style.advanced.common.styleattributeclasses.StyleWrapper; +import eu.udig.style.advanced.internal.Messages; import eu.udig.style.advanced.utils.ImageCache; import eu.udig.style.advanced.utils.Utilities; @@ -103,7 +104,7 @@ public class PolygonPropertiesEditor extends PropertiesEditor { GridLayout rulesAndPreviewGroupLayout = new GridLayout(2, false); rulesAndPreviewGroupLayout.marginTop = 0; rulesAndPreviewGroup.setLayout(rulesAndPreviewGroupLayout); - rulesAndPreviewGroup.setText("Rules list"); + rulesAndPreviewGroup.setText(Messages.PolygonPropertiesEditor_0); Composite canvasComposite = new Composite(rulesAndPreviewGroup, SWT.NONE); canvasComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); @@ -147,7 +148,7 @@ public class PolygonPropertiesEditor extends PropertiesEditor { GridData styleViewerGroupGD = new GridData(SWT.FILL, SWT.FILL, true, true); styleViewerGroup.setLayoutData(styleViewerGroupGD); styleViewerGroup.setLayout(new GridLayout(10, false)); - styleViewerGroup.setText("Style list"); + styleViewerGroup.setText(Messages.PolygonPropertiesEditor_1); Composite styleManagerComposite = new Composite(styleViewerGroup, SWT.NONE); GridData styleManagerCompositeGD = new GridData(SWT.FILL, SWT.FILL, true, true); @@ -179,7 +180,7 @@ public class PolygonPropertiesEditor extends PropertiesEditor { } else { // if it came here, nothing to select Label l = new Label(propertiesComposite, SWT.SHADOW_ETCHED_IN); - l.setText("No rule selected"); + l.setText(Messages.PolygonPropertiesEditor_2); propertiesStackLayout.topControl = l; } @@ -241,7 +242,7 @@ public class PolygonPropertiesEditor extends PropertiesEditor { private void showEmptyLabel() { Label emptyLabel = new Label(propertiesComposite, SWT.NONE); emptyLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true)); - emptyLabel.setText("No rule selected"); + emptyLabel.setText(Messages.PolygonPropertiesEditor_3); propertiesStackLayout.topControl = emptyLabel; propertiesComposite.layout(); } @@ -261,13 +262,13 @@ public class PolygonPropertiesEditor extends PropertiesEditor { final Button addGroupButton = new Button(rulesGroup, SWT.PUSH); addGroupButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); addGroupButton.setImage(addGroupImg); - addGroupButton.setToolTipText("Add a new group"); + addGroupButton.setToolTipText(Messages.PolygonPropertiesEditor_4); addGroupButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { FeatureTypeStyle featureTypeStyle = Utilities.sf.createFeatureTypeStyle(); FeatureTypeStyleWrapper addedFeatureTypeStyle = styleWrapper.addFeatureTypeStyle(featureTypeStyle); - String tmpName = "New Group"; + String tmpName = Messages.PolygonPropertiesEditor_5; tmpName = Utilities.checkSameNameFeatureTypeStyle(styleWrapper.getFeatureTypeStylesWrapperList(), tmpName); addedFeatureTypeStyle.setName(tmpName); @@ -279,7 +280,7 @@ public class PolygonPropertiesEditor extends PropertiesEditor { final Button addButton = new Button(rulesGroup, SWT.PUSH); addButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); addButton.setImage(addImg); - addButton.setToolTipText("Add a new rule"); + addButton.setToolTipText(Messages.PolygonPropertiesEditor_6); addButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { FeatureTypeStyleWrapper selectedFtsw = getSelectedFtsw(); @@ -290,12 +291,12 @@ public class PolygonPropertiesEditor extends PropertiesEditor { } } if (selectedFtsw == null) { - MessageDialog.openWarning(addButton.getShell(), "Warning", - "Please select a group to which to add a new rule."); + MessageDialog.openWarning(addButton.getShell(), Messages.PolygonPropertiesEditor_7, + Messages.PolygonPropertiesEditor_8); return; } RuleWrapper addedRuleWrapper = selectedFtsw.addRule(null, PolygonSymbolizerWrapper.class); - String tmpName = "New Rule"; + String tmpName = Messages.PolygonPropertiesEditor_9; tmpName = Utilities.checkSameNameRule(addedRuleWrapper.getParent().getRulesWrapperList(), tmpName); addedRuleWrapper.setName(tmpName); @@ -308,7 +309,7 @@ public class PolygonPropertiesEditor extends PropertiesEditor { Button deleteButton = new Button(rulesGroup, SWT.PUSH); deleteButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); deleteButton.setImage(delImg); - deleteButton.setToolTipText("Delete the selected rule"); + deleteButton.setToolTipText(Messages.PolygonPropertiesEditor_10); deleteButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { FeatureTypeStyleWrapper selectedFtsw = getSelectedFtsw(); @@ -318,7 +319,7 @@ public class PolygonPropertiesEditor extends PropertiesEditor { } else if (selectedRule != null) { selectedRule.getParent().removeRule(selectedRule); } else { - MessageDialog.openWarning(addButton.getShell(), "Warning", "No rule or group selected."); + MessageDialog.openWarning(addButton.getShell(), Messages.PolygonPropertiesEditor_11, Messages.PolygonPropertiesEditor_12); return; } @@ -330,7 +331,7 @@ public class PolygonPropertiesEditor extends PropertiesEditor { Button deleteAllButton = new Button(rulesGroup, SWT.PUSH); deleteAllButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); deleteAllButton.setImage(delAllImg); - deleteAllButton.setToolTipText("Delete all rules"); + deleteAllButton.setToolTipText(Messages.PolygonPropertiesEditor_13); deleteAllButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { styleWrapper.clear(); @@ -342,7 +343,7 @@ public class PolygonPropertiesEditor extends PropertiesEditor { Button upButton = new Button(rulesGroup, SWT.PUSH); upButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); upButton.setImage(upImg); - upButton.setToolTipText("Move rule up"); + upButton.setToolTipText(Messages.PolygonPropertiesEditor_14); upButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { swap(true); @@ -352,7 +353,7 @@ public class PolygonPropertiesEditor extends PropertiesEditor { Button downButton = new Button(rulesGroup, SWT.PUSH); downButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); downButton.setImage(downImg); - downButton.setToolTipText("Move rule down"); + downButton.setToolTipText(Messages.PolygonPropertiesEditor_15); downButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { swap(false); @@ -372,7 +373,7 @@ public class PolygonPropertiesEditor extends PropertiesEditor { final Button saveButton = new Button(rulesGroup, SWT.PUSH); saveButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); saveButton.setImage(saveImg); - saveButton.setToolTipText("Save selected rule as style"); + saveButton.setToolTipText(Messages.PolygonPropertiesEditor_16); saveButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { RuleWrapper selectedRule = getSelectedRule(); @@ -394,12 +395,12 @@ public class PolygonPropertiesEditor extends PropertiesEditor { final Button saveAllButton = new Button(rulesGroup, SWT.PUSH); saveAllButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); saveAllButton.setImage(saveAllImg); - saveAllButton.setToolTipText("Save all rules as style"); + saveAllButton.setToolTipText(Messages.PolygonPropertiesEditor_17); saveAllButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { - String newStyleName = "New Style"; - InputDialog iDialog = new InputDialog(saveAllButton.getShell(), "Style name", - "Please enter a name for the new style. Styles with same name are substituted.", newStyleName, null); + String newStyleName = Messages.PolygonPropertiesEditor_18; + InputDialog iDialog = new InputDialog(saveAllButton.getShell(), Messages.PolygonPropertiesEditor_19, + Messages.PolygonPropertiesEditor_20, newStyleName, null); iDialog.setBlockOnOpen(true); int open = iDialog.open(); if (open == SWT.CANCEL) { @@ -422,7 +423,7 @@ public class PolygonPropertiesEditor extends PropertiesEditor { Button deleteButton = new Button(rulesGroup, SWT.PUSH); deleteButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); deleteButton.setImage(delImg); - deleteButton.setToolTipText("Remove selected style"); + deleteButton.setToolTipText(Messages.PolygonPropertiesEditor_21); deleteButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { StyleWrapper styleWrapper = polygonStyleManager.getCurrentSelectedStyle(); @@ -440,7 +441,7 @@ public class PolygonPropertiesEditor extends PropertiesEditor { Button loadButton = new Button(rulesGroup, SWT.PUSH); loadButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); loadButton.setImage(loadImg); - loadButton.setToolTipText("Load selected style into the rules list"); + loadButton.setToolTipText(Messages.PolygonPropertiesEditor_22); loadButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { StyleWrapper styleWrapperToLoad = polygonStyleManager.getCurrentSelectedStyle(); @@ -461,7 +462,7 @@ public class PolygonPropertiesEditor extends PropertiesEditor { final Button exportButton = new Button(rulesGroup, SWT.PUSH); exportButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); exportButton.setImage(exportImg); - exportButton.setToolTipText("One click style export for file based layers"); + exportButton.setToolTipText(Messages.PolygonPropertiesEditor_23); exportButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { IGeoResource geoResource = layer.getGeoResource(); @@ -474,8 +475,8 @@ public class PolygonPropertiesEditor extends PropertiesEditor { e1.printStackTrace(); } } else { - MessageDialog.openWarning(exportButton.getShell(), "Warning", - "The selected layer doesn't seem to be file based."); + MessageDialog.openWarning(exportButton.getShell(), Messages.PolygonPropertiesEditor_24, + Messages.PolygonPropertiesEditor_25); } } }); @@ -483,7 +484,7 @@ public class PolygonPropertiesEditor extends PropertiesEditor { final Button openFolderButton = new Button(rulesGroup, SWT.PUSH); openFolderButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); openFolderButton.setImage(openImg); - openFolderButton.setToolTipText("Open the style library folder"); + openFolderButton.setToolTipText(Messages.PolygonPropertiesEditor_26); openFolderButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { File styleFolderFile = polygonStyleManager.getStyleFolderFile(); diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/polygons/widgets/PolygonFillParametersComposite.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/polygons/widgets/PolygonFillParametersComposite.java index cd1c77e..54e84a7 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/polygons/widgets/PolygonFillParametersComposite.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/polygons/widgets/PolygonFillParametersComposite.java @@ -42,6 +42,7 @@ import eu.udig.style.advanced.common.ParameterComposite; import eu.udig.style.advanced.common.IStyleChangesListener.STYLEEVENTTYPE; import eu.udig.style.advanced.common.styleattributeclasses.PolygonSymbolizerWrapper; import eu.udig.style.advanced.common.styleattributeclasses.RuleWrapper; +import eu.udig.style.advanced.internal.Messages; import eu.udig.style.advanced.utils.StolenColorEditor; import eu.udig.style.advanced.utils.Utilities; @@ -100,7 +101,7 @@ public class PolygonFillParametersComposite extends ParameterComposite implement GridData fillEnableButtonGD = new GridData(SWT.BEGINNING, SWT.CENTER, false, false); fillEnableButtonGD.horizontalSpan = 3; fillEnableButton.setLayoutData(fillEnableButtonGD); - fillEnableButton.setText("enable/disable fill"); + fillEnableButton.setText(Messages.PolygonFillParametersComposite_0); fillEnableButton.setSelection(widgetEnabled); fillEnableButton.addSelectionListener(this); @@ -110,7 +111,7 @@ public class PolygonFillParametersComposite extends ParameterComposite implement // fill color Label colorLabel = new Label(mainComposite, SWT.RADIO); colorLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - colorLabel.setText("color"); + colorLabel.setText(Messages.PolygonFillParametersComposite_1); String color = polygonSymbolizerWrapper.getFillColor(); Color tmpColor = null; @@ -140,7 +141,7 @@ public class PolygonFillParametersComposite extends ParameterComposite implement // graphics fill Label graphicsFillLabel = new Label(mainComposite, SWT.RADIO); graphicsFillLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - graphicsFillLabel.setText("graphics"); + graphicsFillLabel.setText(Messages.PolygonFillParametersComposite_2); Composite pathComposite = new Composite(mainComposite, SWT.NONE); GridData pathCompositeGD = new GridData(SWT.FILL, SWT.FILL, true, false); @@ -176,7 +177,7 @@ public class PolygonFillParametersComposite extends ParameterComposite implement // well known marks Label wkmLabel = new Label(mainComposite, SWT.RADIO); wkmLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - wkmLabel.setText("well known mark"); + wkmLabel.setText(Messages.PolygonFillParametersComposite_3); wkmarkNameCombo = new Combo(mainComposite, SWT.DROP_DOWN | SWT.READ_ONLY); GridData wkmarkNameComboGD = new GridData(SWT.FILL, SWT.FILL, false, false); @@ -208,7 +209,7 @@ public class PolygonFillParametersComposite extends ParameterComposite implement wkmWidthSpinner.setMaximum(200); wkmWidthSpinner.setMinimum(0); wkmWidthSpinner.setIncrement(1); - wkmWidthSpinner.setToolTipText("Width"); + wkmWidthSpinner.setToolTipText(Messages.PolygonFillParametersComposite_4); String wkMarkWidth = polygonSymbolizerWrapper.getWkMarkWidthFill(); Double tmpWidth = isDouble(wkMarkWidth); @@ -226,7 +227,7 @@ public class PolygonFillParametersComposite extends ParameterComposite implement wkmSizeSpinner.setMaximum(1000); wkmSizeSpinner.setMinimum(0); wkmSizeSpinner.setIncrement(1); - wkmSizeSpinner.setToolTipText("Size"); + wkmSizeSpinner.setToolTipText(Messages.PolygonFillParametersComposite_5); String wkMarkSize = polygonSymbolizerWrapper.getWkMarkSizeFill(); Double tmpSize = isDouble(wkMarkSize); @@ -256,15 +257,15 @@ public class PolygonFillParametersComposite extends ParameterComposite implement new Label(mainComposite, SWT.NONE); Label valueLabel = new Label(mainComposite, SWT.NONE); valueLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false)); - valueLabel.setText("Manual"); + valueLabel.setText(Messages.PolygonFillParametersComposite_6); Label fieldsLabel = new Label(mainComposite, SWT.NONE); fieldsLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false)); - fieldsLabel.setText("Field based"); + fieldsLabel.setText(Messages.PolygonFillParametersComposite_7); // border alpha Label fillOpactityLabel = new Label(mainComposite, SWT.NONE); fillOpactityLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - fillOpactityLabel.setText("opacity"); + fillOpactityLabel.setText(Messages.PolygonFillParametersComposite_8); fillOpacitySpinner = new Spinner(mainComposite, SWT.BORDER); fillOpacitySpinner.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); fillOpacitySpinner.setMaximum(100); @@ -325,7 +326,7 @@ public class PolygonFillParametersComposite extends ParameterComposite implement try { graphicsPathText.setText(polygonSymbolizerWrapper.getFillExternalGraphicFillPath()); } catch (MalformedURLException e1) { - graphicsPathText.setText(""); + graphicsPathText.setText(""); //$NON-NLS-1$ } String wkMarkNameFill = polygonSymbolizerWrapper.getWkMarkNameFill(); @@ -433,7 +434,7 @@ public class PolygonFillParametersComposite extends ParameterComposite implement try { String text = graphicsPathText.getText(); File graphicsFile = new File(text); - if (graphicsFile.exists() || text.toLowerCase().startsWith("http")) { + if (graphicsFile.exists() || text.toLowerCase().startsWith("http")) { //$NON-NLS-1$ text = graphicsFile.toURI().toURL().toExternalForm(); notifyListeners(text, false, STYLEEVENTTYPE.GRAPHICSPATHFILL); } @@ -446,7 +447,7 @@ public class PolygonFillParametersComposite extends ParameterComposite implement private void doWkmGraphics() { int selectionIndex = wkmarkNameCombo.getSelectionIndex(); String name = wkmarkNameCombo.getItem(selectionIndex); - if (name.equals("")) { + if (name.equals("")) { //$NON-NLS-1$ return; } name = Utilities.markNamesToDef.get(name); diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/polygons/widgets/PolygonGeneralParametersComposite.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/polygons/widgets/PolygonGeneralParametersComposite.java index 8c3ed92..7c3327f 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/polygons/widgets/PolygonGeneralParametersComposite.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/polygons/widgets/PolygonGeneralParametersComposite.java @@ -32,6 +32,7 @@ import eu.udig.style.advanced.common.ParameterComposite; import eu.udig.style.advanced.common.IStyleChangesListener.STYLEEVENTTYPE; import eu.udig.style.advanced.common.styleattributeclasses.PolygonSymbolizerWrapper; import eu.udig.style.advanced.common.styleattributeclasses.RuleWrapper; +import eu.udig.style.advanced.internal.Messages; import eu.udig.style.advanced.utils.Utilities; /** @@ -75,7 +76,7 @@ public class PolygonGeneralParametersComposite extends ParameterComposite { // rule name Label nameLabel = new Label(mainComposite, SWT.NONE); nameLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false)); - nameLabel.setText("Rule name"); + nameLabel.setText(Messages.PolygonGeneralParametersComposite_0); nameText = new Text(mainComposite, SWT.SINGLE | SWT.LEAD | SWT.BORDER); GridData nameTextGD = new GridData(SWT.FILL, SWT.CENTER, true, false); nameTextGD.horizontalSpan = 2; @@ -86,7 +87,7 @@ public class PolygonGeneralParametersComposite extends ParameterComposite { Label offsetLabel = new Label(mainComposite, SWT.NONE); GridData offsetLabelGD = new GridData(SWT.FILL, SWT.CENTER, true, false); offsetLabel.setLayoutData(offsetLabelGD); - offsetLabel.setText("offset (x, y)"); + offsetLabel.setText(Messages.PolygonGeneralParametersComposite_1); String xOffset = polygonSymbolizerWrapper.getxOffset(); String yOffset = polygonSymbolizerWrapper.getyOffset(); @@ -118,7 +119,7 @@ public class PolygonGeneralParametersComposite extends ParameterComposite { Label maxScaleLabel = new Label(mainComposite, SWT.NONE); GridData maxScaleLabelGD = new GridData(SWT.FILL, SWT.CENTER, true, false); maxScaleLabel.setLayoutData(maxScaleLabelGD); - maxScaleLabel.setText("maximum scale"); + maxScaleLabel.setText(Messages.PolygonGeneralParametersComposite_2); maxScaleText = new Text(mainComposite, SWT.SINGLE | SWT.LEAD | SWT.BORDER); GridData maxScaleTextSIMPLEGD = new GridData(SWT.FILL, SWT.CENTER, true, false); maxScaleTextSIMPLEGD.horizontalSpan = 2; @@ -129,7 +130,7 @@ public class PolygonGeneralParametersComposite extends ParameterComposite { Label minScaleLabel = new Label(mainComposite, SWT.NONE); GridData minScaleLabelGD = new GridData(SWT.FILL, SWT.CENTER, true, false); minScaleLabel.setLayoutData(minScaleLabelGD); - minScaleLabel.setText("minimum scale"); + minScaleLabel.setText(Messages.PolygonGeneralParametersComposite_3); minScaleText = new Text(mainComposite, SWT.SINGLE | SWT.LEAD | SWT.BORDER); GridData mainScaleTextSIMPLEGD = new GridData(SWT.FILL, SWT.CENTER, true, false); mainScaleTextSIMPLEGD.horizontalSpan = 2; @@ -163,13 +164,13 @@ public class PolygonGeneralParametersComposite extends ParameterComposite { // scale Double maxScaleDouble = isDouble(ruleWrapper.getMaxScale()); if (maxScaleDouble == null || Double.isInfinite(maxScaleDouble)) { - maxScaleText.setText(""); + maxScaleText.setText(""); //$NON-NLS-1$ } else { maxScaleText.setText(String.valueOf(maxScaleDouble)); } Double minScaleDouble = isDouble(ruleWrapper.getMinScale()); if (minScaleDouble == null || minScaleDouble == 0) { - minScaleText.setText(""); + minScaleText.setText(""); //$NON-NLS-1$ } else { minScaleText.setText(String.valueOf(minScaleDouble)); } @@ -181,7 +182,7 @@ public class PolygonGeneralParametersComposite extends ParameterComposite { double x = Utilities.getDoubleSpinnerSelection(xOffsetSpinner); double y = Utilities.getDoubleSpinnerSelection(yOffsetSpinner); - String offsetStr = x + "," + y; + String offsetStr = x + "," + y; //$NON-NLS-1$ notifyListeners(offsetStr, false, STYLEEVENTTYPE.OFFSET); } } diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/polygons/widgets/PolygonLabelsParametersComposite.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/polygons/widgets/PolygonLabelsParametersComposite.java index 6d0ba51..3e0a999 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/polygons/widgets/PolygonLabelsParametersComposite.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/polygons/widgets/PolygonLabelsParametersComposite.java @@ -43,6 +43,7 @@ import eu.udig.style.advanced.common.IStyleChangesListener.STYLEEVENTTYPE; import eu.udig.style.advanced.common.ParameterComposite; import eu.udig.style.advanced.common.styleattributeclasses.RuleWrapper; import eu.udig.style.advanced.common.styleattributeclasses.TextSymbolizerWrapper; +import eu.udig.style.advanced.internal.Messages; import eu.udig.style.advanced.utils.FontEditor; import eu.udig.style.advanced.utils.StolenColorEditor; import eu.udig.style.advanced.utils.Utilities; @@ -113,14 +114,14 @@ public class PolygonLabelsParametersComposite extends ParameterComposite { GridData labelEnableButtonGD = new GridData(SWT.BEGINNING, SWT.CENTER, false, false); labelEnableButtonGD.horizontalSpan = 3; labelEnableButton.setLayoutData(labelEnableButtonGD); - labelEnableButton.setText("enable/disable labelling"); + labelEnableButton.setText(Messages.PolygonLabelsParametersComposite_0); labelEnableButton.setSelection(widgetEnabled); labelEnableButton.addSelectionListener(this); // label name Label labelNameLabel = new Label(mainComposite, SWT.NONE); labelNameLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - labelNameLabel.setText("label"); + labelNameLabel.setText(Messages.PolygonLabelsParametersComposite_1); labelNameText = new Text(mainComposite, SWT.SINGLE | SWT.LEAD | SWT.BORDER); GridData labelNameTextGD = new GridData(SWT.FILL, SWT.CENTER, true, false); @@ -141,13 +142,13 @@ public class PolygonLabelsParametersComposite extends ParameterComposite { labelNameText.setText(labelName); } } else { - labelNameText.setText(""); + labelNameText.setText(""); //$NON-NLS-1$ } // label alpha Label labelOpactityLabel = new Label(mainComposite, SWT.NONE); labelOpactityLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - labelOpactityLabel.setText("opacity"); + labelOpactityLabel.setText(Messages.PolygonLabelsParametersComposite_3); labelOpacitySpinner = new Spinner(mainComposite, SWT.BORDER); labelOpacitySpinner.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); labelOpacitySpinner.setMaximum(100); @@ -176,7 +177,7 @@ public class PolygonLabelsParametersComposite extends ParameterComposite { // rotation Label rotationLabel = new Label(mainComposite, SWT.NONE); rotationLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - rotationLabel.setText("rotation"); + rotationLabel.setText(Messages.PolygonLabelsParametersComposite_4); rotationSpinner = new Spinner(mainComposite, SWT.BORDER); rotationSpinner.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); rotationSpinner.setMaximum(360); @@ -205,7 +206,7 @@ public class PolygonLabelsParametersComposite extends ParameterComposite { // font Label fontLabel = new Label(mainComposite, SWT.NONE); fontLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - fontLabel.setText("font"); + fontLabel.setText(Messages.PolygonLabelsParametersComposite_5); fontEditor = new FontEditor(mainComposite); GridData fontButtonGD = new GridData(SWT.FILL, SWT.FILL, true, false); @@ -222,7 +223,7 @@ public class PolygonLabelsParametersComposite extends ParameterComposite { // font color Label fontColorLabel = new Label(mainComposite, SWT.NONE); fontColorLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - fontColorLabel.setText("font color"); + fontColorLabel.setText(Messages.PolygonLabelsParametersComposite_6); fontColorEditor = new StolenColorEditor(mainComposite, this); fontColorButton = fontColorEditor.getButton(); @@ -240,7 +241,7 @@ public class PolygonLabelsParametersComposite extends ParameterComposite { // label halo Label haloLabel = new Label(mainComposite, SWT.NONE); haloLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - haloLabel.setText("halo"); + haloLabel.setText(Messages.PolygonLabelsParametersComposite_7); haloColorEditor = new StolenColorEditor(mainComposite, this); haloColorButton = haloColorEditor.getButton(); @@ -274,7 +275,7 @@ public class PolygonLabelsParametersComposite extends ParameterComposite { vendorOptionsGD.horizontalSpan = 3; vendorOptionsGroup.setLayoutData(vendorOptionsGD); vendorOptionsGroup.setLayout(new GridLayout(2, false)); - vendorOptionsGroup.setText("Vendor Options"); + vendorOptionsGroup.setText(Messages.PolygonLabelsParametersComposite_8); // max displacement Label maxDisplacementLabel = new Label(vendorOptionsGroup, SWT.NONE); @@ -288,7 +289,7 @@ public class PolygonLabelsParametersComposite extends ParameterComposite { if (maxDisplacementVO != null) { maxDisplacementText.setText(maxDisplacementVO); } else { - maxDisplacementText.setText(""); + maxDisplacementText.setText(""); //$NON-NLS-1$ } // autoWrap @@ -303,7 +304,7 @@ public class PolygonLabelsParametersComposite extends ParameterComposite { if (autoWrapVO != null) { autoWrapText.setText(autoWrapVO); } else { - autoWrapText.setText(""); + autoWrapText.setText(""); //$NON-NLS-1$ } // spaceAround @@ -318,7 +319,7 @@ public class PolygonLabelsParametersComposite extends ParameterComposite { if (spaceAroundVO != null) { spaceAroundText.setText(spaceAroundVO); } else { - spaceAroundText.setText(""); + spaceAroundText.setText(""); //$NON-NLS-1$ } checkEnablements(); @@ -348,7 +349,7 @@ public class PolygonLabelsParametersComposite extends ParameterComposite { labelNameText.setText(labelName); } } else { - labelNameText.setText(""); + labelNameText.setText(""); //$NON-NLS-1$ } FontData[] fontData = textSymbolizerWrapper.getFontData(); @@ -411,7 +412,7 @@ public class PolygonLabelsParametersComposite extends ParameterComposite { if (maxDisplacementVO != null) { maxDisplacementText.setText(maxDisplacementVO); } else { - maxDisplacementText.setText(""); + maxDisplacementText.setText(""); //$NON-NLS-1$ } // autoWrap @@ -419,7 +420,7 @@ public class PolygonLabelsParametersComposite extends ParameterComposite { if (autoWrapVO != null) { autoWrapText.setText(autoWrapVO); } else { - autoWrapText.setText(""); + autoWrapText.setText(""); //$NON-NLS-1$ } // spaceAround @@ -427,7 +428,7 @@ public class PolygonLabelsParametersComposite extends ParameterComposite { if (spaceAroundVO != null) { spaceAroundText.setText(spaceAroundVO); } else { - spaceAroundText.setText(""); + spaceAroundText.setText(""); //$NON-NLS-1$ } checkEnablements(); diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/raster/CoverageColorEditor.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/raster/CoverageColorEditor.java index 712b3d0..7ddb5ba 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/raster/CoverageColorEditor.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/raster/CoverageColorEditor.java @@ -54,6 +54,8 @@ import org.eclipse.swt.widgets.Scale; import org.eclipse.swt.widgets.Text; import org.geotools.coverage.grid.GridCoverage2D; +import eu.udig.style.advanced.internal.Messages; + /** * The composite holding the raster map style logic. * @@ -105,11 +107,11 @@ public class CoverageColorEditor extends Composite implements SelectionListener gridData.grabExcessHorizontalSpace = true; gridData.verticalAlignment = GridData.CENTER; addRuleButton = new Button(this, SWT.NONE); - addRuleButton.setText("+"); + addRuleButton.setText("+"); //$NON-NLS-1$ addRuleButton.setLayoutData(gridData); addRuleButton.addSelectionListener(this); removeRuleButton = new Button(this, SWT.NONE); - removeRuleButton.setText("-"); + removeRuleButton.setText("-"); //$NON-NLS-1$ removeRuleButton.setLayoutData(gridData1); removeRuleButton.addSelectionListener(this); moveRuleUpButton = new Button(this, SWT.UP | SWT.ARROW); @@ -138,7 +140,7 @@ public class CoverageColorEditor extends Composite implements SelectionListener GridData selectAllGD = new GridData(SWT.FILL, SWT.CENTER, true, false); selectAllGD.horizontalSpan = 3; selectAllButton.setLayoutData(selectAllGD); - selectAllButton.setText("Select all"); + selectAllButton.setText(Messages.CoverageColorEditor_2); selectAllButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { for( CoverageRule cRule : listOfRules ) { @@ -152,7 +154,7 @@ public class CoverageColorEditor extends Composite implements SelectionListener GridData unselectAllGD = new GridData(SWT.FILL, SWT.CENTER, true, false); unselectAllGD.horizontalSpan = 3; unselectAllButton.setLayoutData(unselectAllGD); - unselectAllButton.setText("Unselect all"); + unselectAllButton.setText(Messages.CoverageColorEditor_3); unselectAllButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { for( CoverageRule cRule : listOfRules ) { @@ -166,7 +168,7 @@ public class CoverageColorEditor extends Composite implements SelectionListener GridData invertSelectionGD = new GridData(SWT.FILL, SWT.CENTER, true, false); invertSelectionGD.horizontalSpan = 2; invertSelectionButton.setLayoutData(invertSelectionGD); - invertSelectionButton.setText("Invert selection"); + invertSelectionButton.setText(Messages.CoverageColorEditor_4); invertSelectionButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { for( CoverageRule cRule : listOfRules ) { @@ -179,7 +181,7 @@ public class CoverageColorEditor extends Composite implements SelectionListener GridData resetGD = new GridData(SWT.FILL, SWT.CENTER, true, false); resetGD.horizontalSpan = 8; resetColormapButton = new Button(buttonComposite, SWT.NONE); - resetColormapButton.setText("reset colormap"); + resetColormapButton.setText(Messages.CoverageColorEditor_5); resetColormapButton.setLayoutData(resetGD); resetColormapButton.addSelectionListener(this); @@ -188,7 +190,7 @@ public class CoverageColorEditor extends Composite implements SelectionListener GridData rulesLabelGD = new GridData(SWT.FILL, SWT.CENTER, true, false); rulesLabelGD.horizontalSpan = 3; predefinedRulesLabel.setLayoutData(rulesLabelGD); - predefinedRulesLabel.setText("Set from predefined table"); + predefinedRulesLabel.setText(Messages.CoverageColorEditor_6); predefinedRulesCombo = new Combo(buttonComposite, SWT.DROP_DOWN | SWT.READ_ONLY); GridData comboGD = new GridData(SWT.FILL, SWT.CENTER, true, false); @@ -213,13 +215,13 @@ public class CoverageColorEditor extends Composite implements SelectionListener Group novaluesGroup = new Group(this, SWT.NONE); novaluesGroup.setLayoutData(novaluesGD); novaluesGroup.setLayout(novaluesLayout); - novaluesGroup.setText("Novalues to ignore"); + novaluesGroup.setText(Messages.CoverageColorEditor_7); novaluesText = new Text(novaluesGroup, SWT.SINGLE | SWT.LEAD | SWT.BORDER); novaluesText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - novaluesText.setText("-9999.0"); + novaluesText.setText("-9999.0"); //$NON-NLS-1$ Button addNovalueRulesButton = new Button(novaluesGroup, SWT.PUSH); addNovalueRulesButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false)); - addNovalueRulesButton.setText("Add rules for novalues"); + addNovalueRulesButton.setText(Messages.CoverageColorEditor_9); addNovalueRulesButton.addSelectionListener(new SelectionAdapter(){ public void widgetSelected( SelectionEvent e ) { double[] nvArray = getExtraNovalues(); @@ -292,7 +294,7 @@ public class CoverageColorEditor extends Composite implements SelectionListener alphaGroup = new Group(this, SWT.NONE); alphaGroup.setLayoutData(gridData5); alphaGroup.setLayout(gridLayout1); - alphaGroup.setText("alpha"); + alphaGroup.setText(Messages.CoverageColorEditor_10); alphaScale = new Scale(alphaGroup, SWT.NONE); alphaScale.setLayoutData(gridData6); alphaScale.setMinimum(0); @@ -300,11 +302,11 @@ public class CoverageColorEditor extends Composite implements SelectionListener alphaScale.setPageIncrement(10); alphaScale.setSelection(100); alphaLabel = new Label(alphaGroup, SWT.NONE); - alphaLabel.setText(alphaScale.getSelection() + ""); + alphaLabel.setText(alphaScale.getSelection() + ""); //$NON-NLS-1$ alphaScale.addListener(SWT.Selection, new Listener(){ public void handleEvent( Event event ) { int perspectiveValue = alphaScale.getSelection(); - alphaLabel.setText(perspectiveValue + ""); + alphaLabel.setText(perspectiveValue + ""); //$NON-NLS-1$ } }); } @@ -435,7 +437,7 @@ public class CoverageColorEditor extends Composite implements SelectionListener List novaluesList = new ArrayList(); String novaluesStr = novaluesText.getText(); if (novaluesStr != null && novaluesStr.length() > 0) { - String[] nvSplit = novaluesStr.split(","); + String[] nvSplit = novaluesStr.split(","); //$NON-NLS-1$ for( String nvStr : nvSplit ) { try { double nv = Double.parseDouble(nvStr.trim()); diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/raster/CoverageRule.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/raster/CoverageRule.java index 9eb76e0..c1ef55b 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/raster/CoverageRule.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/raster/CoverageRule.java @@ -97,11 +97,11 @@ public class CoverageRule { */ public String ruleToString() { StringBuffer rule = new StringBuffer(); - rule.append(fromToValues[0] + ":"); - rule.append(fromColor.getRed() + ":" + fromColor.getGreen() + ":" + fromColor.getBlue() - + " "); - rule.append(fromToValues[1] + ":"); - rule.append(toColor.getRed() + ":" + toColor.getGreen() + ":" + toColor.getBlue() + " "); + rule.append(fromToValues[0] + ":"); //$NON-NLS-1$ + rule.append(fromColor.getRed() + ":" + fromColor.getGreen() + ":" + fromColor.getBlue() //$NON-NLS-1$ //$NON-NLS-2$ + + " "); //$NON-NLS-1$ + rule.append(fromToValues[1] + ":"); //$NON-NLS-1$ + rule.append(toColor.getRed() + ":" + toColor.getGreen() + ":" + toColor.getBlue() + " "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ return rule.toString(); } diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/raster/CoverageRuleComposite.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/raster/CoverageRuleComposite.java index 2906a6b..0fc54de 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/raster/CoverageRuleComposite.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/raster/CoverageRuleComposite.java @@ -74,7 +74,7 @@ public class CoverageRuleComposite implements MouseListener, SelectionListener, fromLabelGD.verticalAlignment = GridData.FILL; fromLabelGD.widthHint = colorLabelWidth; fromLabel = new Label(parent, SWT.BORDER); - fromLabel.setText(""); + fromLabel.setText(""); //$NON-NLS-1$ fromLabel.setLayoutData(fromLabelGD); fromLabel.addMouseListener(this); @@ -90,7 +90,7 @@ public class CoverageRuleComposite implements MouseListener, SelectionListener, dummyLabelGD.verticalAlignment = GridData.CENTER; dummyLabelGD.widthHint = 5; Label dummylabel = new Label(parent, SWT.NONE); - dummylabel.setText("-"); + dummylabel.setText("-"); //$NON-NLS-1$ dummylabel.setLayoutData(dummyLabelGD); GridData toLabelGD = new GridData(); @@ -98,7 +98,7 @@ public class CoverageRuleComposite implements MouseListener, SelectionListener, toLabelGD.verticalAlignment = GridData.FILL; toLabelGD.widthHint = colorLabelWidth; toLabel = new Label(parent, SWT.BORDER); - toLabel.setText(""); + toLabel.setText(""); //$NON-NLS-1$ toLabel.setLayoutData(toLabelGD); toLabel.addMouseListener(this); @@ -122,7 +122,7 @@ public class CoverageRuleComposite implements MouseListener, SelectionListener, alphaGD.widthHint = alphaTextWidth; alphaText = new Text(parent, SWT.SINGLE | SWT.LEAD | SWT.BORDER); alphaText.setLayoutData(alphaGD); - alphaText.setText("1.0"); + alphaText.setText("1.0"); //$NON-NLS-1$ alphaText.addKeyListener(this); fromValueText.addKeyListener(this); @@ -139,13 +139,13 @@ public class CoverageRuleComposite implements MouseListener, SelectionListener, enableRuleCheckButton.setSelection(this.rule.isActive()); String value = null; if (this.rule.getFromToValues()[0] != this.rule.getFromToValues()[0]) { - value = ""; + value = ""; //$NON-NLS-1$ } else { value = String.valueOf(this.rule.getFromToValues()[0]); } fromValueText.setText(value); if (this.rule.getFromToValues()[1] != this.rule.getFromToValues()[1]) { - value = ""; + value = ""; //$NON-NLS-1$ } else { value = String.valueOf(this.rule.getFromToValues()[1]); } @@ -213,13 +213,13 @@ public class CoverageRuleComposite implements MouseListener, SelectionListener, try { tmp[0] = Double.parseDouble(fromValueText.getText()); } catch (NumberFormatException ne) { - fromValueText.setText("0"); + fromValueText.setText("0"); //$NON-NLS-1$ return; } try { tmp[1] = Double.parseDouble(toValueText.getText()); } catch (NumberFormatException ne) { - toValueText.setText("0"); + toValueText.setText("0"); //$NON-NLS-1$ return; } rule.setFromToValues(tmp); @@ -227,7 +227,7 @@ public class CoverageRuleComposite implements MouseListener, SelectionListener, double alpha = Double.parseDouble(alphaText.getText()); rule.setOpacity(alpha); } catch (NumberFormatException ne) { - alphaText.setText("1.0"); + alphaText.setText("1.0"); //$NON-NLS-1$ return; } } diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/raster/PredefinedColorRules.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/raster/PredefinedColorRules.java index 47f9028..cab1544 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/raster/PredefinedColorRules.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/raster/PredefinedColorRules.java @@ -52,12 +52,12 @@ public class PredefinedColorRules { * The rainbow colormap is the only one that has to exist. */ public final static String[][] rainbow = new String[][]{ // - {"255", "255", "0"}, // - {"0", "255", "0"}, // - {"0", "255", "255"}, // - {"0", "0", "255"}, // - {"255", "0", "255"}, // - {"255", "0", "0"}}; + {"255", "255", "0"}, // //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + {"0", "255", "0"}, // //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + {"0", "255", "255"}, // //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + {"0", "0", "255"}, // //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + {"255", "0", "255"}, // //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + {"255", "0", "0"}}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ /** * Reads and returns the {@link HashMap map} holding all predefined color rules. @@ -97,22 +97,22 @@ public class PredefinedColorRules { */ try { // create the rainbow colortable, which has to exist - colorRules.put("rainbow", rainbow); + colorRules.put("rainbow", rainbow); //$NON-NLS-1$ File colorTablesFolder = null; Bundle bundle = Platform.getBundle(StylePlugin.PLUGIN_ID); if (bundle != null) { - URL queriesUrl = bundle.getResource("colortables"); + URL queriesUrl = bundle.getResource("colortables"); //$NON-NLS-1$ String colorTablesFolderPath = FileLocator.toFileURL(queriesUrl).getPath(); colorTablesFolder = new File(colorTablesFolderPath); } else { - File baseFolder = new File(".."); + File baseFolder = new File(".."); //$NON-NLS-1$ File[] listFiles = baseFolder.listFiles(); for( File folder : listFiles ) { String name = folder.getName().toLowerCase(); - if (name.startsWith("eu.hydrologis.jgrass.libs") && !name.contains("external") && !name.contains("scripting")) { - colorTablesFolder = new File(folder, "colortables"); + if (name.startsWith("eu.hydrologis.jgrass.libs") && !name.contains("external") && !name.contains("scripting")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + colorTablesFolder = new File(folder, "colortables"); //$NON-NLS-1$ } } @@ -121,23 +121,23 @@ public class PredefinedColorRules { File[] files = colorTablesFolder.listFiles(); for( File file : files ) { String name = file.getName(); - if (name.toLowerCase().endsWith(".clr")) { + if (name.toLowerCase().endsWith(".clr")) { //$NON-NLS-1$ BufferedReader bR = new BufferedReader(new FileReader(file)); List lines = new ArrayList(); String line = null; int cols = 0; while( (line = bR.readLine()) != null ) { - if (line.startsWith("#")) { + if (line.startsWith("#")) { //$NON-NLS-1$ continue; } - String[] lineSplit = line.trim().split("\\s+"); + String[] lineSplit = line.trim().split("\\s+"); //$NON-NLS-1$ cols = lineSplit.length; lines.add(lineSplit); } bR.close(); String[][] linesArray = (String[][]) lines.toArray(new String[lines.size()][cols]); String ruleName = FilenameUtils.getBaseName(file.getName()); - ruleName = ruleName.replaceAll("\\_", " "); + ruleName = ruleName.replaceAll("\\_", " "); //$NON-NLS-1$ //$NON-NLS-2$ colorRules.put(ruleName, linesArray); } } @@ -198,7 +198,7 @@ public class PredefinedColorRules { * and the color rule has to be "v1 r1 g1 b1 v2 r2 g2 b2". */ if (colorRules[0].length != 8) { - throw new IOException("The colortable can have records of 3 or 8 columns. Check your colortables."); + throw new IOException("The colortable can have records of 3 or 8 columns. Check your colortables."); //$NON-NLS-1$ } for( int i = 0; i < colorRules.length; i++ ) { diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/utils/FontEditor.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/utils/FontEditor.java index fe3ec71..4fbb10e 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/utils/FontEditor.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/utils/FontEditor.java @@ -24,6 +24,8 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.FontDialog; import org.eclipse.swt.widgets.Shell; +import eu.udig.style.advanced.internal.Messages; + /** *

* A "button" with an icon/text that pops up the font window. @@ -55,7 +57,7 @@ public class FontEditor { fFont = new Font[1]; fColor = new Color[1]; - fButton.setText("set font"); + fButton.setText(Messages.FontEditor_0); labelFontDialog = new FontDialog(new Shell()); labelFontDialog.setText("Choose a Font"); //$NON-NLS-1$ diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/utils/ImageCache.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/utils/ImageCache.java index 9495466..0876cec 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/utils/ImageCache.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/utils/ImageCache.java @@ -35,18 +35,18 @@ import eu.udig.style.advanced.StylePlugin; @SuppressWarnings("nls") public class ImageCache { - public static final String ADD = "icons/add.gif"; - public static final String ADDGROUP = "icons/addgroup.gif"; - public static final String APPLY = "icons/apply.gif"; - public static final String DELETE = "icons/delete.gif"; - public static final String DELETEALL = "icons/deleteall.gif"; - public static final String DOWN = "icons/down.gif"; - public static final String IMPORT = "icons/import.gif"; - public static final String OPEN = "icons/open.gif"; - public static final String UP = "icons/up.gif"; - public static final String SAVE = "icons/save.gif"; - public static final String SAVEALL = "icons/saveall.gif"; - public static final String ONECLICKEXPORT = "icons/export.gif"; + public static final String ADD = "icons/add.gif"; //$NON-NLS-1$ + public static final String ADDGROUP = "icons/addgroup.gif"; //$NON-NLS-1$ + public static final String APPLY = "icons/apply.gif"; //$NON-NLS-1$ + public static final String DELETE = "icons/delete.gif"; //$NON-NLS-1$ + public static final String DELETEALL = "icons/deleteall.gif"; //$NON-NLS-1$ + public static final String DOWN = "icons/down.gif"; //$NON-NLS-1$ + public static final String IMPORT = "icons/import.gif"; //$NON-NLS-1$ + public static final String OPEN = "icons/open.gif"; //$NON-NLS-1$ + public static final String UP = "icons/up.gif"; //$NON-NLS-1$ + public static final String SAVE = "icons/save.gif"; //$NON-NLS-1$ + public static final String SAVEALL = "icons/saveall.gif"; //$NON-NLS-1$ + public static final String ONECLICKEXPORT = "icons/export.gif"; //$NON-NLS-1$ private static ImageCache imageCache; diff --git a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/utils/VendorOptions.java b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/utils/VendorOptions.java index c9bc272..deddf7f 100644 --- a/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/utils/VendorOptions.java +++ b/plugins/eu.udig.style.advanced/src/eu/udig/style/advanced/utils/VendorOptions.java @@ -1,4 +1,7 @@ package eu.udig.style.advanced.utils; + +import eu.udig.style.advanced.internal.Messages; + /** * Enumeration of possible vendor options. * @@ -6,13 +9,13 @@ package eu.udig.style.advanced.utils; */ @SuppressWarnings("nls") public enum VendorOptions { - VENDOROPTION_MAXDISPLACEMENT("maxDisplacement", "max displacement pixels"), // - VENDOROPTION_AUTOWRAP("autoWrap", "auto wrap pixels"), // - VENDOROPTION_SPACEAROUND("spaceAround", "space around pixels"), // - VENDOROPTION_REPEAT("repeat", "repeat every pixels"), // - VENDOROPTION_MAXANGLEDELTA("maxAngleDelta", "max angle allowed"), // - VENDOROPTION_FOLLOWLINE("followLine", "follow line"), // - VENDOROPTION_OTHER("other", "other"); + VENDOROPTION_MAXDISPLACEMENT("maxDisplacement", Messages.VendorOptions_1), // //$NON-NLS-1$ + VENDOROPTION_AUTOWRAP("autoWrap", Messages.VendorOptions_3), // //$NON-NLS-1$ + VENDOROPTION_SPACEAROUND("spaceAround", Messages.VendorOptions_5), // //$NON-NLS-1$ + VENDOROPTION_REPEAT("repeat", Messages.VendorOptions_7), // //$NON-NLS-1$ + VENDOROPTION_MAXANGLEDELTA("maxAngleDelta", Messages.VendorOptions_9), // //$NON-NLS-1$ + VENDOROPTION_FOLLOWLINE("followLine", Messages.VendorOptions_11), // //$NON-NLS-1$ + VENDOROPTION_OTHER("other", Messages.VendorOptions_13); //$NON-NLS-1$ private String defString = null; private String guiString = null;