r2756 - in trunk/jaxx-widgets/src: main/java/jaxx/runtime/swing/editor/gis test/java/jaxx/runtime/swing/editor/gis test/resources
Author: tchemit Date: 2013-11-26 15:10:47 +0100 (Tue, 26 Nov 2013) New Revision: 2756 Url: http://nuiton.org/projects/jaxx/repository/revisions/2756 Log: fixes #2929: Introduce some coordinate editors Modified: trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmdCoordinate.java trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmdCoordinateConverter.java trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmdCoordinateEditor.jaxx trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmdCoordinateEditorHandler.java trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmdCoordinateEditorModel.java trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmsCoordinate.java trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmsCoordinateConverter.java trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmsCoordinateEditor.jaxx trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmsCoordinateEditorHandler.java trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmsCoordinateEditorModel.java trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/MaskFormatterFromConverter.java trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmdCoordinateConverterTest.java trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmdCoordinateEditorTest.java trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmdCoordinateTest.java trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmsCoordinateConverterTest.java trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmsCoordinateEditorTest.java trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmsCoordinateTest.java trunk/jaxx-widgets/src/test/resources/log4j.properties Modified: trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmdCoordinate.java =================================================================== --- trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmdCoordinate.java 2013-11-25 15:54:51 UTC (rev 2755) +++ trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmdCoordinate.java 2013-11-26 14:10:47 UTC (rev 2756) @@ -67,6 +67,27 @@ } /** + * Methode statique de fabrique de position a partir d'un autre {@link DmdCoordinate}. + * <p/> + * Note : Si la valeur vaut <code>null</code>, alors on + * reinitialise les composants de la position a <code>null</code> et la + * methode {@link #isNull()} vaudra alors {@code true}. + * + * @param decimal la valeur au format decimal + * @return une nouvelle instance de position convertie + */ + public static DmdCoordinate valueOf(DmdCoordinate decimal) { + DmdCoordinate r = empty(); + if (decimal != null) { + r.setSign(decimal.isSign()); + r.setDegree(decimal.getDegree()); + r.setMinute(decimal.getMinute()); + r.setDecimal(decimal.getDecimal()); + } + return r; + } + + /** * Methode statique de fabrique de position a partir d'une valeur du format * decimal. * <p/> @@ -92,7 +113,10 @@ * @param dc la valeur des décimales de minutes * @return une nouvelle instance de position convertie */ - public static DmdCoordinate valueOf(boolean sign, int d, int m, int dc) { + public static DmdCoordinate valueOf(boolean sign, + Integer d, + Integer m, + Integer dc) { DmdCoordinate r = new DmdCoordinate(); r.setSign(sign); r.setDegree(d); @@ -185,39 +209,17 @@ if (rest > 0) { m = rest / 100; dc = (rest - m * 100); - - // clean not used values - if (m == 0) { - m = null; - } - if (dc == 0) { - dc = null; - } } - if (d == 0) { - d = null; - } - - if (d != null || m != null || dc != null) { - - // fill with 0 other null values - // if one value is not null, then put zero everywhere - if (d == null) { - d = 0; - } - if (m == null) { - m = 0; - } - if (dc == null) { - dc = 0; - } - } } degree = d; minute = m; decimal = dc; sign = si; + + if (decimal != null) { + removeTrailingZero(); + } } public Float toDecimal() { @@ -235,6 +237,31 @@ return result; } + public void addTrailingZero() { + + if (degree == null) { + degree = 0; + } + if (minute == null) { + minute = 0; + } + if (decimal == null) { + decimal = 0; + } + } + + public void removeTrailingZero() { + if (degree != null && degree == 0) { + degree = null; + } + if (minute != null && minute == 0) { + minute = null; + } + if (decimal != null && decimal == 0) { + decimal = null; + } + } + public Integer getSignedDegree() { Integer result = null; if (!isDegreeNull()) { Modified: trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmdCoordinateConverter.java =================================================================== --- trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmdCoordinateConverter.java 2013-11-25 15:54:51 UTC (rev 2755) +++ trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmdCoordinateConverter.java 2013-11-26 14:10:47 UTC (rev 2756) @@ -44,10 +44,6 @@ protected boolean forLongitude; - public boolean isUseSign() { - return useSign; - } - public void setUseSign(boolean useSign) { this.useSign = useSign; } @@ -59,15 +55,26 @@ @Override public Object convert(Class aClass, Object value) { + if (!isEnabled(aClass)) { + throw new ConversionException( + _("jaxx.error.no.convertor.coordinateDmd", value)); + } + Object result = null; - if (value != null) { + if (value == null) { - if (!isEnabled(aClass)) { - throw new ConversionException( - _("jaxx.error.no.convertor.coordinateDmd", value)); + if (aClass.equals(String.class)) { + + result = String.format( + DmdCoordinate.COORDINATE_STRING_PATTERN, + useSign ? "-" : "", + StringUtils.leftPad("", forLongitude ? 3 : 2, ' '), + StringUtils.leftPad("", 2, ' '), + StringUtils.leftPad("", 2, ' ')); } - + } else { + if (aClass.equals(value.getClass())) { // same class, no convertion to do @@ -84,16 +91,15 @@ String minutesStr = matcher.group(2).replaceAll("\\s", ""); String decimalesStr = matcher.group(3).replaceAll("\\s", ""); - Integer degre = degresStr.isEmpty() || "-".equals(degresStr) ? 0 : Integer.valueOf(degresStr); - Integer minutes = minutesStr.isEmpty() ? 0 : Integer.valueOf(minutesStr); - Integer decimal = decimalesStr.isEmpty() ? 0 : Integer.valueOf(decimalesStr); + Integer degre = degresStr.isEmpty() || "-".equals(degresStr) ? null : Math.abs(Integer.valueOf(degresStr)); + Integer minutes = minutesStr.isEmpty() ? null : Integer.valueOf(minutesStr); + Integer decimal = decimalesStr.isEmpty() ? null : Integer.valueOf(decimalesStr); boolean signed = degresStr.contains("-"); - result = - DmdCoordinate.valueOf(signed, - Math.abs(degre), - minutes, - decimal); + result = DmdCoordinate.valueOf(signed, + degre, + minutes, + decimal); } } else if (value instanceof DmdCoordinate) { @@ -120,7 +126,6 @@ StringUtils.leftPad(degreeStr, forLongitude ? 3 : 2, ' '), StringUtils.leftPad(minuteStr, 2, ' '), StringUtils.leftPad(decimalStr, 2, ' ')); - } } return result; Modified: trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmdCoordinateEditor.jaxx =================================================================== --- trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmdCoordinateEditor.jaxx 2013-11-25 15:54:51 UTC (rev 2755) +++ trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmdCoordinateEditor.jaxx 2013-11-26 14:10:47 UTC (rev 2756) @@ -42,13 +42,12 @@ <DmdCoordinateEditorHandler id='handler' constructorParams='this'/> <script><![CDATA[ -public void init() { handler.init(); } +public void init(boolean longitudeEditor) { handler.init(longitudeEditor); } public void setBean(Serializable bean) { model.setBean(bean); } public void setPropertySign(String property ) { model.setPropertySign(property); } public void setPropertyDegree(String property ) { model.setPropertyDegree(property); } public void setPropertyMinute(String property ) { model.setPropertyMinute(property); } public void setPropertyDecimal(String property ) { model.setPropertyDecimal(property); } -public void setLongitudeEditor(boolean longitudeEditor) { model.setLongitudeEditor(longitudeEditor); } public void setValue(DmdCoordinate value) { handler.setValue(value, false); } ]]> </script> Modified: trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmdCoordinateEditorHandler.java =================================================================== --- trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmdCoordinateEditorHandler.java 2013-11-25 15:54:51 UTC (rev 2755) +++ trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmdCoordinateEditorHandler.java 2013-11-26 14:10:47 UTC (rev 2756) @@ -31,7 +31,6 @@ import javax.swing.JFormattedTextField; import javax.swing.text.DefaultFormatterFactory; -import javax.swing.text.MaskFormatter; import java.awt.event.KeyEvent; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; @@ -64,17 +63,37 @@ protected boolean valueModelIsAdjusting; - private final DmdCoordinateConverter converter; + protected final DmdCoordinateConverter signedConverter; + protected final DmdCoordinateConverter unsignedConverter; + + protected DefaultFormatterFactory signedFormatterFactory; + + protected DefaultFormatterFactory unsignedFormatterFactory; + public DmdCoordinateEditorHandler(DmdCoordinateEditor ui) { this.ui = ui; // can't use the one from ConverterUtil since we deal with some internal states - this.converter = new DmdCoordinateConverter(); + this.signedConverter = new DmdCoordinateConverter(); + this.signedConverter.setUseSign(true); + this.unsignedConverter = new DmdCoordinateConverter(); } - public void init() { + public String getMaskFormatterPattern(boolean longitudeEditor, boolean useSign) { + String pattern = "**°**''**"; + if (longitudeEditor) { + // add one more degre + pattern = "*" + pattern; + } + if (useSign) { + pattern = "-" + pattern; + } + return pattern; + } + public void init(boolean longitudeEditor) { + final DmdCoordinateEditorModel model = ui.getModel(); Preconditions.checkNotNull(model.getBean(), "could not find bean in " + ui); @@ -83,8 +102,6 @@ Preconditions.checkNotNull(model.getPropertyMinute(), "could not find propertyMinute in " + ui); Preconditions.checkNotNull(model.getPropertyDecimal(), "could not find propertyDecimal in " + ui); - converter.setForLongitude(model.isLongitudeEditor()); - Object bean = model.getBean(); signMutator = BeanUIUtil.getMutator(bean, model.getPropertySign()); Preconditions.checkNotNull(signMutator, "could not find mutator for " + model.getPropertySign()); @@ -98,23 +115,46 @@ decimalMutator = BeanUIUtil.getMutator(bean, model.getPropertyDecimal()); Preconditions.checkNotNull(decimalMutator, "could not find mutator for " + model.getPropertyDecimal()); - MaskFormatter maskFormatter; - try { + signedConverter.setForLongitude(longitudeEditor); + unsignedConverter.setForLongitude(longitudeEditor); - String pattern = model.getMaskFormatterPattern(); - maskFormatter = new MaskFormatterFromConverter<DmdCoordinate>( - DmdCoordinate.class, pattern, converter); - maskFormatter.setValidCharacters(" 01234567890"); - } catch (ParseException e) { - // can't happen here - throw new RuntimeException(e); + { + // prepare unsigned formatter factory + String pattern = getMaskFormatterPattern(longitudeEditor, false); + MaskFormatterFromConverter<DmdCoordinate> maskFormatter; + try { + maskFormatter = MaskFormatterFromConverter.newFormatter( + DmdCoordinate.class, + pattern, unsignedConverter); + maskFormatter.setValidCharacters(" 01234567890"); + maskFormatter.setCommitsOnValidEdit(true); + unsignedFormatterFactory = new DefaultFormatterFactory(maskFormatter); + } catch (ParseException e) { + // can't happen here + throw new RuntimeException(e); + } } + { + // prepare signed formatter factory + String pattern = getMaskFormatterPattern(longitudeEditor, true); + MaskFormatterFromConverter<DmdCoordinate> maskFormatter; + try { + maskFormatter = MaskFormatterFromConverter.newFormatter( + DmdCoordinate.class, + pattern, signedConverter); + maskFormatter.setValidCharacters(" 01234567890"); + maskFormatter.setCommitsOnValidEdit(true); + signedFormatterFactory = new DefaultFormatterFactory(maskFormatter); + } catch (ParseException e) { + // can't happen here + throw new RuntimeException(e); + } + } - DefaultFormatterFactory formatterFactory = - new DefaultFormatterFactory(maskFormatter); - JFormattedTextField editor = ui.getEditor(); - editor.setFormatterFactory(formatterFactory); + editor.setFormatterFactory(model.isSign() ? + signedFormatterFactory : + unsignedFormatterFactory); editor.setFocusLostBehavior(JFormattedTextField.COMMIT); // When editor changes his value, propagate it to model @@ -129,18 +169,6 @@ } }); - // When longitudeEditor property changed, propagate to the converter - model.addPropertyChangeListener( - DmdCoordinateEditorModel.PROPERTY_LONGITUDE_EDITOR, - new PropertyChangeListener() { - @Override - public void propertyChange(PropertyChangeEvent evt) { - Boolean newValue = (Boolean) evt.getNewValue(); - converter.setForLongitude(newValue != null && newValue); - } - } - ); - // When model sign changed, let's push it back in bean model.addPropertyChangeListener( DmdCoordinateEditorModel.PROPERTY_SIGN, @@ -183,7 +211,7 @@ setValue(null, true); // use back unsigned format - converter.setUseSign(false); + ui.getEditor().setFormatterFactory(unsignedFormatterFactory); } public void onKeyReleased(KeyEvent e) { @@ -196,21 +224,23 @@ log.debug("Key pressed: " + keyChar + " (caret position: " + caretPosition + ")"); } - String newValue = null; - DefaultFormatterFactory newFactory = null; if (keyChar == '-') { + DmdCoordinate value = (DmdCoordinate) source.getValue(); + + DefaultFormatterFactory newFactory; + // try to switch unsigned to signed - boolean useSign = converter.isUseSign(); + boolean useSign = ui.getModel().isSign(); + if (useSign) { if (log.isDebugEnabled()) { log.debug("Switch to unsigned"); } - converter.setUseSign(false); - source.setText(source.getText().substring(1).trim()); + newFactory = unsignedFormatterFactory; // remove a sign caretPosition--; @@ -219,26 +249,20 @@ if (log.isDebugEnabled()) { log.debug("Switch to signed"); } - converter.setUseSign(true); + newFactory = signedFormatterFactory; - source.setText("-" + source.getText()); - // add a sign caretPosition++; } - try { - source.commitEdit(); - } catch (ParseException e1) { - // ignore it - if (log.isErrorEnabled()) { - log.error("Could not commit edit of " + source.getText(), e1); - } - } - if (log.isDebugEnabled()) { - log.debug("Key pressed: newValue " + source.getValue()); - } + DmdCoordinate newValue = DmdCoordinate.valueOf(value); + newValue.setSign(!useSign); + + source.setFormatterFactory(newFactory); + source.setValue(newValue); + e.consume(); + source.setCaretPosition(caretPosition); } } Modified: trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmdCoordinateEditorModel.java =================================================================== --- trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmdCoordinateEditorModel.java 2013-11-25 15:54:51 UTC (rev 2755) +++ trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmdCoordinateEditorModel.java 2013-11-26 14:10:47 UTC (rev 2756) @@ -44,8 +44,6 @@ public static final String PROPERTY_PROPERTY_DECIMAL = "propertyDecimal"; - public static final String PROPERTY_LONGITUDE_EDITOR = "longitudeEditor"; - private static final long serialVersionUID = 1L; /** Bean where to push data. */ @@ -63,11 +61,6 @@ /** Name of the property of the bean to fire the change of the {@link #decimal}. */ protected String propertyDecimal; - /** - * {@code true} if longitude editor, {@code false} for latitude editor. - */ - protected boolean longitudeEditor; - public Serializable getBean() { return bean; } @@ -118,16 +111,6 @@ firePropertyChange(PROPERTY_PROPERTY_DECIMAL, oldValue, propertyDecimal); } - public boolean isLongitudeEditor() { - return longitudeEditor; - } - - public void setLongitudeEditor(boolean longitudeEditor) { - Object oldValue = isLongitudeEditor(); - this.longitudeEditor = longitudeEditor; - firePropertyChange(PROPERTY_BEAN, oldValue, longitudeEditor); - } - public void setValue(DmdCoordinate value) { setSign(value != null && value.isSign()); setDegree(value == null ? null : value.getDegree()); @@ -135,15 +118,6 @@ setDecimal(value == null ? null : value.getDecimal()); } - public String getMaskFormatterPattern() { - String pattern = "**°**''**"; - if (isLongitudeEditor()) { - // add one more degre - pattern = "*" + pattern; - } - return pattern; - } - public String getStringPattern() { String pattern = COORDINATE_STRING_PATTERN; return pattern; Modified: trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmsCoordinate.java =================================================================== --- trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmsCoordinate.java 2013-11-25 15:54:51 UTC (rev 2755) +++ trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmsCoordinate.java 2013-11-26 14:10:47 UTC (rev 2756) @@ -67,6 +67,27 @@ } /** + * Methode statique de fabrique de position a partir d'un autre {@link DmsCoordinate}. + * <p/> + * Note : Si la valeur vaut <code>null</code>, alors on + * reinitialise les composants de la position a <code>null</code> et la + * methode {@link #isNull()} vaudra alors {@code true}. + * + * @param decimal la valeur au format decimal + * @return une nouvelle instance de position convertie + */ + public static DmsCoordinate valueOf(DmsCoordinate decimal) { + DmsCoordinate r = new DmsCoordinate(); + if (decimal != null) { + r.setSign(decimal.isSign()); + r.setDegree(decimal.getDegree()); + r.setMinute(decimal.getMinute()); + r.setSecond(decimal.getSecond()); + } + return r; + } + + /** * Methode statique de fabrique de position a partir d'une valeur du format * decimal. * <p/> @@ -92,7 +113,7 @@ * @param s la valeur des secondes * @return une nouvelle instance de position convertie */ - public static DmsCoordinate valueOf(boolean sign, int d, int m, int s) { + public static DmsCoordinate valueOf(boolean sign, Integer d, Integer m, Integer s) { DmsCoordinate r = new DmsCoordinate(); r.setSign(sign); r.setDegree(d); @@ -204,39 +225,16 @@ d++; m = 0; } - - // clean not used values - if (m == 0) { - m = null; - } - if (s == 0) { - s = null; - } - - if (d != null || m != null || s != null) { - - // if one value is not null, then put zero everywhere - if (d == null) { - d = 0; - } - if (m == null) { - m = 0; - } - if (s == null) { - s = 0; - } - } } -// if (d != null && d == 0) { -// d = null; -// } - degree = d; minute = m; second = s; sign = si; + if (decimal != null) { + removeTrailingZero(); + } } public Float toDecimal() { @@ -266,6 +264,32 @@ return result; } + public DmsCoordinate addTrailingZero() { + if (degree == null) { + degree = 0; + } + if (minute == null) { + minute = 0; + } + if (second == null) { + second = 0; + } + return this; + } + + public DmsCoordinate removeTrailingZero() { + if (degree != null && degree == 0) { + degree = null; + } + if (minute != null && minute == 0) { + minute = null; + } + if (second != null && second == 0) { + second = null; + } + return this; + } + public Integer getSignedDegree() { Integer result = null; if (!isDegreeNull()) { Modified: trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmsCoordinateConverter.java =================================================================== --- trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmsCoordinateConverter.java 2013-11-25 15:54:51 UTC (rev 2755) +++ trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmsCoordinateConverter.java 2013-11-26 14:10:47 UTC (rev 2756) @@ -44,10 +44,6 @@ protected boolean forLongitude; - public boolean isUseSign() { - return useSign; - } - public void setUseSign(boolean useSign) { this.useSign = useSign; } @@ -59,14 +55,25 @@ @Override public Object convert(Class aClass, Object value) { + if (!isEnabled(aClass)) { + throw new ConversionException( + _("jaxx.error.no.convertor.coordinateDms", value)); + } + Object result = null; - if (value != null) { + if (value == null) { - if (!isEnabled(aClass)) { - throw new ConversionException( - _("jaxx.error.no.convertor.coordinateDmd", value)); + if (aClass.equals(String.class)) { + + result = String.format( + DmsCoordinate.COORDINATE_STRING_PATTERN, + useSign ? "-" : "", + StringUtils.leftPad("", forLongitude ? 3 : 2, ' '), + StringUtils.leftPad("", 2, ' '), + StringUtils.leftPad("", 2, ' ')); } + } else { if (aClass.equals(value.getClass())) { @@ -84,13 +91,13 @@ String minutesStr = matcher.group(2).replaceAll("\\s", ""); String secondsStr = matcher.group(3).replaceAll("\\s", ""); - Integer degre = degresStr.isEmpty() || "-".equals(degresStr) ? 0 : Integer.valueOf(degresStr); - Integer minutes = minutesStr.isEmpty() ? 0 : Integer.valueOf(minutesStr); - Integer seconds = secondsStr.isEmpty() ? 0 : Integer.valueOf(secondsStr); + Integer degre = degresStr.isEmpty() || "-".equals(degresStr) ? null : Math.abs(Integer.valueOf(degresStr)); + Integer minutes = minutesStr.isEmpty() ? null : Integer.valueOf(minutesStr); + Integer seconds = secondsStr.isEmpty() ? null : Integer.valueOf(secondsStr); boolean signed = degresStr.contains("-"); result = DmsCoordinate.valueOf(signed, - Math.abs(degre), + degre, minutes, seconds); } Modified: trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmsCoordinateEditor.jaxx =================================================================== --- trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmsCoordinateEditor.jaxx 2013-11-25 15:54:51 UTC (rev 2755) +++ trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmsCoordinateEditor.jaxx 2013-11-26 14:10:47 UTC (rev 2756) @@ -43,13 +43,12 @@ <DmsCoordinateEditorHandler id='handler' constructorParams='this'/> <script><![CDATA[ -public void init() { handler.init(); } +public void init(boolean longitudeEditor) { handler.init(longitudeEditor); } public void setBean(Serializable bean) { model.setBean(bean); } public void setPropertySign(String property ) { model.setPropertySign(property); } public void setPropertyDegree(String property ) { model.setPropertyDegree(property); } public void setPropertyMinute(String property ) { model.setPropertyMinute(property); } public void setPropertySecond(String property ) { model.setPropertySecond(property); } -public void setLongitudeEditor(boolean longitudeEditor) { model.setLongitudeEditor(longitudeEditor); } public void setValue(DmsCoordinate value) { handler.setValue(value, false); } ]]> </script> Modified: trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmsCoordinateEditorHandler.java =================================================================== --- trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmsCoordinateEditorHandler.java 2013-11-25 15:54:51 UTC (rev 2755) +++ trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmsCoordinateEditorHandler.java 2013-11-26 14:10:47 UTC (rev 2756) @@ -31,7 +31,6 @@ import javax.swing.JFormattedTextField; import javax.swing.text.DefaultFormatterFactory; -import javax.swing.text.MaskFormatter; import java.awt.event.KeyEvent; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; @@ -64,16 +63,24 @@ protected boolean valueModelIsAdjusting; - private final DmsCoordinateConverter converter; + protected final DmsCoordinateConverter signedConverter; + protected final DmsCoordinateConverter unsignedConverter; + + protected DefaultFormatterFactory signedFormatterFactory; + + protected DefaultFormatterFactory unsignedFormatterFactory; + public DmsCoordinateEditorHandler(DmsCoordinateEditor ui) { this.ui = ui; // can't use the one from ConverterUtil since we deal with some internal states - this.converter = new DmsCoordinateConverter(); + this.signedConverter = new DmsCoordinateConverter(); + this.signedConverter.setUseSign(true); + this.unsignedConverter = new DmsCoordinateConverter(); } - public void init() { + public void init(boolean longitudeEditor) { final DmsCoordinateEditorModel model = ui.getModel(); @@ -96,24 +103,46 @@ secondMutator = BeanUIUtil.getMutator(bean, model.getPropertySecond()); Preconditions.checkNotNull(secondMutator, "could not find mutator for " + model.getPropertySecond()); - converter.setForLongitude(model.isLongitudeEditor()); + signedConverter.setForLongitude(longitudeEditor); + unsignedConverter.setForLongitude(longitudeEditor); - MaskFormatter maskFormatter; - try { - - String pattern = model.getMaskFormatterPattern(); - maskFormatter = new MaskFormatterFromConverter<DmsCoordinate>( - DmsCoordinate.class, - pattern, converter); - maskFormatter.setValidCharacters(" 01234567890"); - } catch (ParseException e) { - // can't happen here - throw new RuntimeException(e); + { + // prepare unsigned formatter factory + String pattern = getMaskFormatterPattern(longitudeEditor, false); + MaskFormatterFromConverter<DmsCoordinate> maskFormatter; + try { + maskFormatter = MaskFormatterFromConverter.newFormatter( + DmsCoordinate.class, + pattern, unsignedConverter); + maskFormatter.setValidCharacters(" 01234567890"); + maskFormatter.setCommitsOnValidEdit(true); + unsignedFormatterFactory = new DefaultFormatterFactory(maskFormatter); + } catch (ParseException e) { + // can't happen here + throw new RuntimeException(e); + } } - DefaultFormatterFactory formatterFactory = new DefaultFormatterFactory(maskFormatter); + { + // prepare signed formatter factory + String pattern = getMaskFormatterPattern(longitudeEditor, true); + MaskFormatterFromConverter<DmsCoordinate> maskFormatter; + try { + maskFormatter = MaskFormatterFromConverter.newFormatter( + DmsCoordinate.class, + pattern, signedConverter); + maskFormatter.setValidCharacters(" 01234567890"); + maskFormatter.setCommitsOnValidEdit(true); + signedFormatterFactory = new DefaultFormatterFactory(maskFormatter); + } catch (ParseException e) { + // can't happen here + throw new RuntimeException(e); + } + } JFormattedTextField editor = ui.getEditor(); - editor.setFormatterFactory(formatterFactory); + editor.setFormatterFactory(model.isSign() ? + signedFormatterFactory : + unsignedFormatterFactory); editor.setFocusLostBehavior(JFormattedTextField.COMMIT); // When editor changes his value, propagate it to model @@ -128,18 +157,6 @@ } }); - // When longitudeEditor property changed, propagate to the converter - model.addPropertyChangeListener( - DmsCoordinateEditorModel.PROPERTY_LONGITUDE_EDITOR, - new PropertyChangeListener() { - @Override - public void propertyChange(PropertyChangeEvent evt) { - Boolean newValue = (Boolean) evt.getNewValue(); - converter.setForLongitude(newValue != null && newValue); - } - } - ); - // When model sign changed, let's push it back in bean model.addPropertyChangeListener( DmsCoordinateEditorModel.PROPERTY_SIGN, @@ -178,11 +195,12 @@ } public void resetEditor() { + // set null value to model setValue(null, true); // use back unsigned format - converter.setUseSign(false); + ui.getEditor().setFormatterFactory(unsignedFormatterFactory); } public void onKeyReleased(KeyEvent e) { @@ -195,21 +213,23 @@ log.debug("Key pressed: " + keyChar + " (caret position: " + caretPosition + ")"); } - boolean needConsume = false; if (keyChar == '-') { + DmsCoordinate value = (DmsCoordinate) source.getValue(); + + DefaultFormatterFactory newFactory; + // try to switch unsigned to signed - boolean useSign = converter.isUseSign(); + boolean useSign = ui.getModel().isSign(); if (useSign) { if (log.isDebugEnabled()) { log.debug("Switch to unsigned"); } - converter.setUseSign(false); - source.setText(source.getText().substring(1).trim()); + newFactory = unsignedFormatterFactory; // remove a sign caretPosition--; @@ -218,32 +238,20 @@ if (log.isDebugEnabled()) { log.debug("Switch to signed"); } - converter.setUseSign(true); + newFactory = signedFormatterFactory; - source.setText("-" + source.getText()); - // add a sign caretPosition++; } - needConsume = useSign != converter.isUseSign(); - } + DmsCoordinate newValue = DmsCoordinate.valueOf(value); + newValue.setSign(!useSign); - try { - source.commitEdit(); - } catch (ParseException e1) { - // ignore it - if (log.isErrorEnabled()) { - log.error("Could not commit edit of " + source.getText(), e1); - } - } + source.setFormatterFactory(newFactory); + source.setValue(newValue); - if (log.isDebugEnabled()) { - log.debug("Key pressed: newValue " + source.getValue()); - } + e.consume(); - if (needConsume) { - e.consume(); source.setCaretPosition(caretPosition); } } @@ -279,4 +287,17 @@ } } } + + protected String getMaskFormatterPattern(boolean longitudeEditor, + boolean useSign) { + String pattern = "**°**''**''''"; + if (longitudeEditor) { + // add one more degre + pattern = "*" + pattern; + } + if (useSign) { + pattern = "-" + pattern; + } + return pattern; + } } Modified: trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmsCoordinateEditorModel.java =================================================================== --- trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmsCoordinateEditorModel.java 2013-11-25 15:54:51 UTC (rev 2755) +++ trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/DmsCoordinateEditorModel.java 2013-11-26 14:10:47 UTC (rev 2756) @@ -44,8 +44,6 @@ public static final String PROPERTY_PROPERTY_SECOND = "propertySecond"; - public static final String PROPERTY_LONGITUDE_EDITOR = "longitudeEditor"; - private static final long serialVersionUID = 1L; /** Bean where to push data. */ @@ -63,11 +61,6 @@ /** Name of the property of the bean to fire the change of the {@link #second}. */ protected String propertySecond; - /** - * {@code true} if longitude editor, {@code false} for latitude editor. - */ - protected boolean longitudeEditor; - public Serializable getBean() { return bean; } @@ -118,16 +111,6 @@ firePropertyChange(PROPERTY_PROPERTY_SECOND, oldValue, propertySecond); } - public boolean isLongitudeEditor() { - return longitudeEditor; - } - - public void setLongitudeEditor(boolean longitudeEditor) { - Object oldValue = isLongitudeEditor(); - this.longitudeEditor = longitudeEditor; - firePropertyChange(PROPERTY_BEAN, oldValue, longitudeEditor); - } - public void setValue(DmsCoordinate value) { setSign(value != null && value.isSign()); setDegree(value == null ? null : value.getDegree()); @@ -135,15 +118,6 @@ setSecond(value == null ? null : value.getSecond()); } - public String getMaskFormatterPattern() { - String pattern = "**°**''**''''"; - if (isLongitudeEditor()) { - // add one more degre - pattern = "*" + pattern; - } - return pattern; - } - public String getStringPattern() { return COORDINATE_STRING_PATTERN; } Modified: trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/MaskFormatterFromConverter.java =================================================================== --- trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/MaskFormatterFromConverter.java 2013-11-25 15:54:51 UTC (rev 2755) +++ trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/gis/MaskFormatterFromConverter.java 2013-11-26 14:10:47 UTC (rev 2756) @@ -43,7 +43,13 @@ private final Class<O> type; - public MaskFormatterFromConverter(Class<O> type, + public static <O> MaskFormatterFromConverter<O> newFormatter(Class<O> type, + String pattern, + Converter converter) throws ParseException { + return new MaskFormatterFromConverter<O>(type, pattern, converter); + } + + protected MaskFormatterFromConverter(Class<O> type, String pattern, Converter converter) throws ParseException { super(pattern); Modified: trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmdCoordinateConverterTest.java =================================================================== --- trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmdCoordinateConverterTest.java 2013-11-25 15:54:51 UTC (rev 2755) +++ trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmdCoordinateConverterTest.java 2013-11-26 14:10:47 UTC (rev 2756) @@ -36,19 +36,28 @@ */ public class DmdCoordinateConverterTest { - @Test public void testConvert() throws Exception { ConverterUtil.initConverters(); - testConversion(false, "- 0° 0'44", DmdCoordinate.valueOf(-0.007333f)); - testConversion(false, " 0° 0'44", DmdCoordinate.valueOf(0.007333f)); + testConversion(false, "- ° '44", DmdCoordinate.valueOf(-0.007333f)); + testConversion(false, " ° '44", DmdCoordinate.valueOf(0.007333f)); + testConversion(false, " ° '99", DmdCoordinate.valueOf(false, null, null, 99)); + testConversion(false, " ° ' ", DmdCoordinate.empty()); + testConversion(false, " °39'99", DmdCoordinate.valueOf(false, null, 39, 99)); + testConversion(false, " °39' ", DmdCoordinate.valueOf(false, null, 39, null)); testConversion(false, " 0°39'99", DmdCoordinate.valueOf(false, 0, 39, 99)); + testConversion(false, " 0° ' ", DmdCoordinate.valueOf(false, 0, null, null)); - testConversion(true, "- 0° 0'44", DmdCoordinate.valueOf(-0.007333f)); - testConversion(true, " 0° 0'44", DmdCoordinate.valueOf(0.007333f)); + testConversion(true, "- ° '44", DmdCoordinate.valueOf(-0.007333f)); + testConversion(true, " ° '44", DmdCoordinate.valueOf(0.007333f)); + testConversion(true, " ° ' ", DmdCoordinate.empty()); + testConversion(true, " ° '99", DmdCoordinate.valueOf(false, null, null, 99)); + testConversion(true, " °39'99", DmdCoordinate.valueOf(false, null, 39, 99)); + testConversion(true, " °39' ", DmdCoordinate.valueOf(false, null, 39, null)); testConversion(true, " 0°39'99", DmdCoordinate.valueOf(false, 0, 39, 99)); + testConversion(true, " 0° ' ", DmdCoordinate.valueOf(false, 0, null, null)); } protected void testConversion(boolean forLongitude, String expectedString, DmdCoordinate expectedCoordinate) { @@ -61,6 +70,7 @@ DmdCoordinate actualCoordinate; // String -> DmdCoordinate + actualCoordinate = (DmdCoordinate) converter.convert(DmdCoordinate.class, expectedString); Assert.assertNotNull(actualCoordinate); Assert.assertEquals(actualCoordinate.isSign(), expectedCoordinate.isSign()); @@ -83,6 +93,7 @@ Assert.assertEquals(expectedString, actualStr); // DmdCoordinate -> DmdCoordinate + actualCoordinate = (DmdCoordinate) converter.convert(DmdCoordinate.class, expectedCoordinate); Assert.assertNotNull(actualCoordinate); Assert.assertEquals(actualCoordinate.isSign(), expectedCoordinate.isSign()); Modified: trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmdCoordinateEditorTest.java =================================================================== --- trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmdCoordinateEditorTest.java 2013-11-25 15:54:51 UTC (rev 2755) +++ trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmdCoordinateEditorTest.java 2013-11-26 14:10:47 UTC (rev 2756) @@ -153,9 +153,8 @@ longitudeEditor.setPropertyDegree(EditorBean.PROPERTY_LONGITUDE_DEGREE); longitudeEditor.setPropertyMinute(EditorBean.PROPERTY_LONGITUDE_MINUTE); longitudeEditor.setPropertyDecimal(EditorBean.PROPERTY_LONGITUDE_DECIMAL); - longitudeEditor.setLongitudeEditor(true); longitudeEditor.setShowReset(true); - longitudeEditor.init(); + longitudeEditor.init(true); DmdCoordinateEditor latitudeEditor = new DmdCoordinateEditor(); latitudeEditor.setBean(bean); @@ -163,9 +162,8 @@ latitudeEditor.setPropertyDegree(EditorBean.PROPERTY_LATITUDE_DEGREE); latitudeEditor.setPropertyMinute(EditorBean.PROPERTY_LATITUDE_MINUTE); latitudeEditor.setPropertyDecimal(EditorBean.PROPERTY_LATITUDE_DECIMAL); - latitudeEditor.setLongitudeEditor(false); latitudeEditor.setShowReset(true); - latitudeEditor.init(); + latitudeEditor.init(false); final JLabel latitudeResult = new JLabel(); final JLabel longitudeResult = new JLabel(); Modified: trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmdCoordinateTest.java =================================================================== --- trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmdCoordinateTest.java 2013-11-25 15:54:51 UTC (rev 2755) +++ trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmdCoordinateTest.java 2013-11-26 14:10:47 UTC (rev 2756) @@ -43,7 +43,15 @@ coordinate.fromDecimal(42.7f); - assertDmdCoordinate(coordinate, false, 42,42,0); + assertDmdCoordinate(coordinate, false, 42, 42, null); + + coordinate.addTrailingZero(); + + assertDmdCoordinate(coordinate, false, 42, 42, 0); + + coordinate.removeTrailingZero(); + + assertDmdCoordinate(coordinate, false, 42, 42, null); } { @@ -52,7 +60,7 @@ float decimalExcepted = 42.707f; coordinate.fromDecimal(decimalExcepted); - assertDmdCoordinate(coordinate, false, 42,42,42); + assertDmdCoordinate(coordinate, false, 42, 42, 42); Float decimal = coordinate.toDecimal(); Assert.assertEquals(decimalExcepted, decimal, 0.001); @@ -82,7 +90,7 @@ coordinate.fromDecimal(expected); - assertDmdCoordinate(coordinate, false, 12,12,0); + assertDmdCoordinate(coordinate, false, 12, 12, null); } { @@ -96,7 +104,7 @@ component.fromDecimal(expected); - assertDmdCoordinate(component, false, 12,12,20); + assertDmdCoordinate(component, false, 12, 12, 20); } } @@ -113,7 +121,7 @@ Assert.assertTrue(coordinate.isMinuteValid()); Assert.assertTrue(coordinate.isDecimalValid()); - assertDmdCoordinate(coordinate, true, 0, 0, 44); + assertDmdCoordinate(coordinate, true, null, null, 44); } public static void assertDmdCoordinate(DmdCoordinate coordinate, Modified: trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmsCoordinateConverterTest.java =================================================================== --- trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmsCoordinateConverterTest.java 2013-11-25 15:54:51 UTC (rev 2755) +++ trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmsCoordinateConverterTest.java 2013-11-26 14:10:47 UTC (rev 2756) @@ -42,16 +42,28 @@ ConverterUtil.initConverters(); - testConversion(false, "- 0° 0'26''", DmsCoordinate.valueOf(-0.007333f)); - testConversion(false, " 0° 0'26''", DmsCoordinate.valueOf(0.007333f)); + testConversion(false, "- ° '26''", DmsCoordinate.valueOf(-0.007333f)); + testConversion(false, " ° '26''", DmsCoordinate.valueOf(0.007333f)); + testConversion(false, " ° '59''", DmsCoordinate.valueOf(false, null, null, 59)); + testConversion(false, " ° ' ''", DmsCoordinate.empty()); + testConversion(false, " °39'59''", DmsCoordinate.valueOf(false, null, 39, 59)); + testConversion(false, " °39' ''", DmsCoordinate.valueOf(false, null, 39, null)); testConversion(false, " 0°39'59''", DmsCoordinate.valueOf(false, 0, 39, 59)); + testConversion(false, " 0° ' ''", DmsCoordinate.valueOf(false, 0, null, null)); - testConversion(true, "- 0° 0'26''", DmsCoordinate.valueOf(-0.007333f)); - testConversion(true, " 0° 0'26''", DmsCoordinate.valueOf(0.007333f)); + testConversion(true, "- ° '26''", DmsCoordinate.valueOf(-0.007333f)); + testConversion(true, " ° '26''", DmsCoordinate.valueOf(0.007333f)); + testConversion(true, " ° ' ''", DmsCoordinate.empty()); + testConversion(true, " ° '59''", DmsCoordinate.valueOf(false, null, null, 59)); + testConversion(true, " °39'59''", DmsCoordinate.valueOf(false, null, 39, 59)); + testConversion(true, " °39' ''", DmsCoordinate.valueOf(false, null, 39, null)); testConversion(true, " 0°39'59''", DmsCoordinate.valueOf(false, 0, 39, 59)); + testConversion(true, " 0° ' ''", DmsCoordinate.valueOf(false, 0, null, null)); } - protected void testConversion(boolean forLongitude, String expectedString, DmsCoordinate expectedCoordinate) { + protected void testConversion(boolean forLongitude, + String expectedString, + DmsCoordinate expectedCoordinate) { DmsCoordinateConverter converter = (DmsCoordinateConverter) ConverterUtil.getConverter(DmsCoordinate.class); converter.setForLongitude(forLongitude); @@ -61,6 +73,7 @@ DmsCoordinate actualCoordinate; // String -> DmsCoordinate + actualCoordinate = (DmsCoordinate) converter.convert(DmsCoordinate.class, expectedString); Assert.assertNotNull(actualCoordinate); Assert.assertEquals(actualCoordinate.isSign(), expectedCoordinate.isSign()); @@ -83,6 +96,7 @@ Assert.assertEquals(expectedString, actualStr); // DmsCoordinate -> DmsCoordinate + actualCoordinate = (DmsCoordinate) converter.convert(DmsCoordinate.class, expectedCoordinate); Assert.assertNotNull(actualCoordinate); Assert.assertEquals(actualCoordinate.isSign(), expectedCoordinate.isSign()); Modified: trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmsCoordinateEditorTest.java =================================================================== --- trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmsCoordinateEditorTest.java 2013-11-25 15:54:51 UTC (rev 2755) +++ trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmsCoordinateEditorTest.java 2013-11-26 14:10:47 UTC (rev 2756) @@ -81,7 +81,7 @@ return longitude; } - public void setLongitudeDegre(Integer degre) { + public void setLongitudeDegree(Integer degre) { Object oldValue = longitude.getDegree(); longitude.setDegree(degre); firePropertyChange(PROPERTY_LONGITUDE_DEGREE, oldValue, degre); @@ -110,7 +110,7 @@ return latitude; } - public void setLatitudeDegre(Integer degre) { + public void setLatitudeDegree(Integer degre) { Object oldValue = latitude.getDegree(); latitude.setDegree(degre); firePropertyChange(PROPERTY_LATITUDE_DEGREE, oldValue, degre); @@ -155,9 +155,8 @@ longitudeEditor.setPropertyDegree(EditorBean.PROPERTY_LONGITUDE_DEGREE); longitudeEditor.setPropertyMinute(EditorBean.PROPERTY_LONGITUDE_MINUTE); longitudeEditor.setPropertySecond(EditorBean.PROPERTY_LONGITUDE_SECOND); - longitudeEditor.setLongitudeEditor(true); longitudeEditor.setShowReset(true); - longitudeEditor.init(); + longitudeEditor.init(true); DmsCoordinateEditor latitudeEditor = new DmsCoordinateEditor(); latitudeEditor.setBean(bean); @@ -165,9 +164,8 @@ latitudeEditor.setPropertyDegree(EditorBean.PROPERTY_LATITUDE_DEGREE); latitudeEditor.setPropertyMinute(EditorBean.PROPERTY_LATITUDE_MINUTE); latitudeEditor.setPropertySecond(EditorBean.PROPERTY_LATITUDE_SECOND); - latitudeEditor.setLongitudeEditor(false); latitudeEditor.setShowReset(true); - latitudeEditor.init(); + latitudeEditor.init(false); final JLabel latitudeResult = new JLabel(); final JLabel longitudeResult = new JLabel(); Modified: trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmsCoordinateTest.java =================================================================== --- trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmsCoordinateTest.java 2013-11-25 15:54:51 UTC (rev 2755) +++ trunk/jaxx-widgets/src/test/java/jaxx/runtime/swing/editor/gis/DmsCoordinateTest.java 2013-11-26 14:10:47 UTC (rev 2756) @@ -43,7 +43,7 @@ actual.fromDecimal(42.7f); - assertDmsCoordinate(actual, false, 42, 42, 0); + assertDmsCoordinate(actual, false, 42, 42, null); } { @@ -82,7 +82,7 @@ Assert.assertEquals(expected, floatValue, 0.001); coordinate.fromDecimal(expected); - assertDmsCoordinate(coordinate, false, 12, 12, 0); + assertDmsCoordinate(coordinate, false, 12, 12, null); } @@ -116,7 +116,7 @@ Assert.assertTrue(coordinate.isMinuteValid()); Assert.assertTrue(coordinate.isSecondValid()); - assertDmsCoordinate(coordinate, true, 0, 0, 26); + assertDmsCoordinate(coordinate, true, null, null, 26); } public static void assertDmsCoordinate(DmsCoordinate coordinate, Modified: trunk/jaxx-widgets/src/test/resources/log4j.properties =================================================================== --- trunk/jaxx-widgets/src/test/resources/log4j.properties 2013-11-25 15:54:51 UTC (rev 2755) +++ trunk/jaxx-widgets/src/test/resources/log4j.properties 2013-11-26 14:10:47 UTC (rev 2756) @@ -29,6 +29,6 @@ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) %M - %m%n -log4j.logger.jaxx.swing=INFO +log4j.logger.jaxx.runtime.swing=DEBUG #log4j.logger.jaxx.runtime.swing.editor.config.model.ConfigUIModelBuilder=DEBUG log4j.logger.org.nuiton=WARN
participants (1)
-
tchemit@users.nuiton.org