mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-11 09:38:28 +08:00
Remove unused debug info in VConsole
This commit is contained in:
parent
5ff33a03fd
commit
b86663e461
@ -11,6 +11,7 @@ import com.google.gwt.user.client.ui.TextBox;
|
||||
import com.vaadin.terminal.gwt.client.ApplicationConnection;
|
||||
import com.vaadin.terminal.gwt.client.BrowserInfo;
|
||||
import com.vaadin.terminal.gwt.client.UIDL;
|
||||
import com.vaadin.terminal.gwt.client.VConsole;
|
||||
import com.vaadin.terminal.gwt.client.ui.VPopupCalendar;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -25,6 +26,8 @@ public class VMaskedPopupCalendar extends VPopupCalendar {
|
||||
|
||||
private static final String MASKED_FIELD_CLASS = "v-maskedfield-onlymask";
|
||||
|
||||
private static final boolean isDebug = false;
|
||||
|
||||
private char placeholder = '_';
|
||||
|
||||
private StringBuilder string;
|
||||
@ -40,7 +43,8 @@ public class VMaskedPopupCalendar extends VPopupCalendar {
|
||||
private TextBox textBox;
|
||||
|
||||
private void debug(String msg) {
|
||||
ApplicationConnection.getConsole().log(msg);
|
||||
if (isDebug)
|
||||
VConsole.log(msg);
|
||||
}
|
||||
|
||||
private KeyPressHandler keyPressHandler = new KeyPressHandler() {
|
||||
@ -144,7 +148,7 @@ public class VMaskedPopupCalendar extends VPopupCalendar {
|
||||
public void onBlur(BlurEvent event) {
|
||||
if (isReadonly())
|
||||
return;
|
||||
if (!string.toString().equals(nullRepresentation)){
|
||||
if (!string.toString().equals(nullRepresentation)) {
|
||||
textBox.getElement().removeClassName(MASKED_FIELD_CLASS);
|
||||
}
|
||||
debug("blurHandler.onBlur");
|
||||
@ -186,7 +190,7 @@ public class VMaskedPopupCalendar extends VPopupCalendar {
|
||||
|
||||
public void setText(String value) {
|
||||
debug("setText: " + value);
|
||||
if (value.equals(nullRepresentation)||value.equals("")) {
|
||||
if (value.equals(nullRepresentation) || value.equals("")) {
|
||||
textBox.getElement().addClassName(MASKED_FIELD_CLASS);
|
||||
} else {
|
||||
textBox.getElement().removeClassName(MASKED_FIELD_CLASS);
|
||||
|
@ -1,28 +1,23 @@
|
||||
package com.haulmont.cuba.toolkit.gwt.client.ui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.event.dom.client.BlurEvent;
|
||||
import com.google.gwt.event.dom.client.BlurHandler;
|
||||
import com.google.gwt.event.dom.client.FocusEvent;
|
||||
import com.google.gwt.event.dom.client.FocusHandler;
|
||||
import com.google.gwt.event.dom.client.KeyCodes;
|
||||
import com.google.gwt.event.dom.client.KeyDownEvent;
|
||||
import com.google.gwt.event.dom.client.KeyDownHandler;
|
||||
import com.google.gwt.event.dom.client.KeyPressEvent;
|
||||
import com.google.gwt.event.dom.client.KeyPressHandler;
|
||||
import com.google.gwt.event.dom.client.*;
|
||||
import com.vaadin.terminal.gwt.client.ApplicationConnection;
|
||||
import com.vaadin.terminal.gwt.client.BrowserInfo;
|
||||
import com.vaadin.terminal.gwt.client.UIDL;
|
||||
import com.vaadin.terminal.gwt.client.VConsole;
|
||||
import com.vaadin.terminal.gwt.client.ui.VTextField;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class VMaskedTextField extends VTextField {
|
||||
|
||||
public static final String CLASSNAME = "v-maskedfield";
|
||||
|
||||
private static final String MASKED_FIELD_CLASS = "v-maskedfield-onlymask";
|
||||
|
||||
private static final boolean isDebug = false;
|
||||
|
||||
private char placeholder = '_';
|
||||
|
||||
private StringBuilder string;
|
||||
@ -34,7 +29,8 @@ public class VMaskedTextField extends VTextField {
|
||||
private List<Mask> maskTest;
|
||||
|
||||
private void debug(String msg) {
|
||||
ApplicationConnection.getConsole().log(msg);
|
||||
if (isDebug)
|
||||
VConsole.log(msg);
|
||||
}
|
||||
|
||||
private KeyPressHandler keyPressHandler = new KeyPressHandler() {
|
||||
|
@ -60,8 +60,6 @@ public abstract class WidgetMap {
|
||||
String fullyqualifiedName);
|
||||
|
||||
private Paintable instantiateInternal(Class<? extends Paintable> classType) {
|
||||
VConsole.log(String.valueOf(classType));
|
||||
VConsole.log(String.valueOf(instmap.get(classType)));
|
||||
return instmap.get(classType).get();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user