[Schmitzm-commits] r474 - in branches/1.0-gt2-2.6/src/skrueger: geotools swing
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Oct 15 16:04:19 CEST 2009
Author: alfonx
Date: 2009-10-15 16:04:16 +0200 (Thu, 15 Oct 2009)
New Revision: 474
Added:
branches/1.0-gt2-2.6/src/skrueger/swing/SmallButton.java
Modified:
branches/1.0-gt2-2.6/src/skrueger/geotools/AttributeMetadataMap.java
branches/1.0-gt2-2.6/src/skrueger/swing/DialogManager.java
Log:
* AS-Hacking: Improved two label labeling. The seperation char only appears when the second property is not empty.
Modified: branches/1.0-gt2-2.6/src/skrueger/geotools/AttributeMetadataMap.java
===================================================================
--- branches/1.0-gt2-2.6/src/skrueger/geotools/AttributeMetadataMap.java 2009-10-14 22:57:27 UTC (rev 473)
+++ branches/1.0-gt2-2.6/src/skrueger/geotools/AttributeMetadataMap.java 2009-10-15 14:04:16 UTC (rev 474)
@@ -25,7 +25,7 @@
public AttributeMetadata get(Name name) {
final AttributeMetadata attributeMetadata = super.get(name);
- if (attributeMetadata == null) {
+ if (attributeMetadata == null && name != null && !name.getLocalPart().trim().isEmpty()) {
put(name,new AttributeMetadata(name));
return super.get(name);
}
Modified: branches/1.0-gt2-2.6/src/skrueger/swing/DialogManager.java
===================================================================
--- branches/1.0-gt2-2.6/src/skrueger/swing/DialogManager.java 2009-10-14 22:57:27 UTC (rev 473)
+++ branches/1.0-gt2-2.6/src/skrueger/swing/DialogManager.java 2009-10-15 14:04:16 UTC (rev 474)
@@ -50,6 +50,12 @@
return dialog;
}
+ /**
+ * @param key
+ * @param owner
+ * @param constArgs
+ * @return a cached instance or creates a new instance. Instances are always retuned visible and toFront.
+ */
public abstract DIALOG getInstanceFor(final KEY key, final Component owner,
final Object... constArgs);
Added: branches/1.0-gt2-2.6/src/skrueger/swing/SmallButton.java
===================================================================
--- branches/1.0-gt2-2.6/src/skrueger/swing/SmallButton.java 2009-10-14 22:57:27 UTC (rev 473)
+++ branches/1.0-gt2-2.6/src/skrueger/swing/SmallButton.java 2009-10-15 14:04:16 UTC (rev 474)
@@ -0,0 +1,20 @@
+package skrueger.swing;
+
+import javax.swing.Action;
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+
+public class SmallButton extends JButton {
+
+ public SmallButton(Action action, String tooltip) {
+ this (action);
+ if (tooltip != null)
+ setToolTipText(tooltip);
+ }
+
+ public SmallButton(Action action) {
+ super(action);
+ setBorder(BorderFactory.createEtchedBorder());
+ }
+
+}
Property changes on: branches/1.0-gt2-2.6/src/skrueger/swing/SmallButton.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id URL
Name: svn:eol-style
+ native
More information about the Schmitzm-commits
mailing list