List of usage examples for javax.swing.text JTextComponent setEditable
@BeanProperty(description = "specifies if the text can be edited") public void setEditable(boolean b)
TextComponent
should be editable. From source file:Main.java
public static void setEditable(JTextComponent... components) { for (JTextComponent component : components) { component.setEditable(true); }// w ww . j av a2 s .c om }
From source file:Main.java
public static void setUneditable(JTextComponent... components) { for (JTextComponent component : components) { component.setEditable(false); }/*from www . j av a 2 s. c om*/ }
From source file:Main.java
public static void setEditable(JTextComponent component, boolean editable) { component.setEditable(editable); component.setBackground(editable ? NORMAL_BG : NOT_EDITABLE_BG); }
From source file:com.haulmont.cuba.desktop.gui.components.DesktopPickerField.java
@Override protected void setEditableToComponent(boolean editable) { for (Action action : actionsOrder) { if (action instanceof StandardAction) { ((StandardAction) action).setEditable(editable); }//ww w. j a va 2s . c o m } if (!editable && impl.getEditor() instanceof JTextComponent) { JTextComponent editor = (JTextComponent) impl.getEditor(); editor.setEditable(false); } updateMissingValueState(); }