/** * Creates a new object and saves in it the current enable/disable state of * the given control and its descendents except for the given list of * exception cases; the controls that are saved are also disabled. * * @param w * the control * @param exceptions * the list of controls to not disable (element type: * <code>Control</code>), or <code>null</code> if none */ protected ControlEnableState(Control w, List exceptions) { super(); states = new ArrayList(); this.exceptions = exceptions; readStateForAndDisable(w); }
/** * Creates a new object and saves in it the current enable/disable state of * the given control and its descendents except for the given list of * exception cases; the controls that are saved are also disabled. * * @param w * the control * @param exceptions * the list of controls to not disable (element type: * <code>Control</code>), or <code>null</code> if none */ protected ControlEnableState(Control w, List<Control> exceptions) { super(); states = new ArrayList<>(); this.exceptions = exceptions; readStateForAndDisable(w); }
/** * Creates a new object and saves in it the current enable/disable state of * the given control and its descendents except for the given list of * exception cases; the controls that are saved are also disabled. * * @param w * the control * @param exceptions * the list of controls to not disable (element type: * <code>Control</code>), or <code>null</code> if none */ protected ControlEnableState(Control w, List<Control> exceptions) { super(); states = new ArrayList<>(); this.exceptions = exceptions; readStateForAndDisable(w); }
/** * Recursively reads the enable/disable state for the given window and * disables all controls. * @param control Control */ private void readStateForAndDisable(Control control) { if ((exceptions != null && exceptions.contains(control))) { return; } if (control instanceof Composite) { Composite c = (Composite) control; Control[] children = c.getChildren(); for (int i = 0; i < children.length; i++) { readStateForAndDisable(children[i]); } } // XXX: Workaround for 1G2Q8SS: ITPUI:Linux - Combo box is not enabled // in "File->New->Solution" states.add(new ItemState(control, control.getEnabled())); control.setEnabled(false); }
/** * Recursively reads the enable/disable state for the given window and * disables all controls. * @param control Control */ private void readStateForAndDisable(Control control) { if ((exceptions != null && exceptions.contains(control))) { return; } if (control instanceof Composite) { Composite c = (Composite) control; Control[] children = c.getChildren(); for (Control element : children) { readStateForAndDisable(element); } } // XXX: Workaround for 1G2Q8SS: ITPUI:Linux - Combo box is not enabled // in "File->New->Solution" states.add(new ItemState(control, control.getEnabled())); control.setEnabled(false); }
/** * Recursively reads the enable/disable state for the given window and * disables all controls. * @param control Control */ private void readStateForAndDisable(Control control) { if ((exceptions != null && exceptions.contains(control))) { return; } if (control instanceof Composite) { Composite c = (Composite) control; Control[] children = c.getChildren(); for (int i = 0; i < children.length; i++) { readStateForAndDisable(children[i]); } } // XXX: Workaround for 1G2Q8SS: ITPUI:Linux - Combo box is not enabled // in "File->New->Solution" states.add(new ItemState(control, control.getEnabled())); control.setEnabled(false); }