public void keyTraversed( TraverseEvent te ) { te.doit = false; // set focus on the next control. // set focus on the next control. // What is the next control : 0 int thisOne = 0; while ( !controls[ thisOne ].isEnabled() ) { thisOne++; if ( thisOne >= controls.length ) { return; // already tried all others, time to quit. } } controls[ thisOne ].setFocus(); } } );
public void keyTraversed( TraverseEvent te ) { te.doit = false; // set focus on the next control. // What is the next control? int thisOne = controlNr + 1; while ( !controls[ thisOne ].isEnabled() ) { thisOne++; if ( thisOne >= controls.length ) { thisOne = 0; } if ( thisOne == controlNr ) { return; // already tried all others, time to quit. } } controls[ thisOne ].setFocus(); } } );
/** * Returns if control is active. No validation will be process when control is not active. * * @return Returns if control is active. No validation will be process when control is not * active. */ private boolean controlActive() { return control.isEnabled(); }
public boolean isEnabled() { for ( Control control : getControls() ) { if ( control.isEnabled() ) { return true; } } return false; }
public boolean isEnabled () { if (isUIAttached()) { //always take the state from the widget (if it was set directly on it) as this is the old behavior enabled_ = control_.isEnabled(); } return enabled_; }
public boolean isEnabled() { for ( Control control : getControls() ) { if ( control.isEnabled() ) { return true; } } return false; }
private void saveEnableStateAndSet(Control w, HashMap h, boolean enabled) { if (!w.isDisposed()) { h.put(w, new Boolean(w.isEnabled())); w.setEnabled(enabled); } }
private void saveEnableStateAndSet(Control w, HashMap<Object, Object> h, boolean enabled) { if (!w.isDisposed()) { h.put(w, Boolean.valueOf(w.isEnabled())); w.setEnabled(enabled); } }
private void disableControl(Control ctrl, List<Control> toEnable) { if (ctrl != null && !ctrl.isDisposed() && ctrl.isEnabled()) { ctrl.setEnabled(false); toEnable.add(ctrl); } }
protected boolean isMenuItemEnabled ( IMenuItem item ) { Widget widget = (Widget) item.getAttached(); if ( widget == null ) return true; if ( widget instanceof CTabItem ) { Control ctrl = ((CTabItem) widget).getControl(); return ctrl == null || ctrl.isEnabled(); } return true; }
public void keyPressed(KeyEvent e) { if (UIUtils.isSubmitKeyEvent(e)) { Control button = getButton(IDialogConstants.OK_ID); // fire OK action only when button is enabled if (button != null && button.isEnabled()) buttonPressed(IDialogConstants.OK_ID); } } });
void enableWidget (boolean enabled) { if (view instanceof NSControl) { ((NSControl)view).setEnabled(enabled); } updateCursorRects (isEnabled ()); }
protected void updateButtonState() { if (fButtonControls != null && isOkToUse(fTableControl) && fTableControl.isEnabled()) { ISelection sel= fTable.getSelection(); for (int i= 0; i < fButtonControls.length; i++) { Button button= fButtonControls[i]; if (isOkToUse(button)) { button.setEnabled(isButtonEnabled(sel, i)); } } } }
boolean translateMnemonic (Event event, Control control) { if (control == this) return false; if (!isVisible () || !isEnabled ()) return false; event.doit = this == display.mnemonicControl || mnemonicMatch (event.character); return traverse (event); }
id getEnabledAttribute (int childID) { AccessibleControlEvent event = new AccessibleControlEvent(this); event.detail = ACC.STATE_NORMAL; event.childID = childID; for (int i = 0; i < accessibleControlListenersSize(); i++) { AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i); listener.getState(event); } boolean enabled = (event.detail & ACC.STATE_DISABLED) == 0; if (!enabled && delegate == null) enabled = control.isEnabled(); return NSNumber.numberWithBool(enabled); }
void updateCursorRects (boolean enabled) { super.updateCursorRects (enabled); Control [] children = _getChildren (); for (int i = 0; i < children.length; i++) { Control control = children [i]; control.updateCursorRects (enabled && control.isEnabled ()); } }
boolean translateMnemonic (Event event, Control control) { if (control == this) return false; if (!isVisible () || !isEnabled ()) return false; event.doit = this == display.mnemonicControl || mnemonicMatch (event.character); return traverse (event); }
boolean translateMnemonic (Event event, Control control) { if (control == this) return false; if (!isVisible () || !isEnabled ()) return false; event.doit = this == display.mnemonicControl || mnemonicMatch (event.character); return traverse (event); }
protected void updateButtonState() { if (fButtonControls != null && isOkToUse(fTableControl) && fTableControl.isEnabled()) { ISelection sel= fTable.getSelection(); for (int i= 0; i < fButtonControls.length; i++) { Button button= fButtonControls[i]; if (isOkToUse(button)) { button.setEnabled(isButtonEnabled(sel, i)); } } } }
boolean translateMnemonic (Event event, Control control) { if (control == this) return false; if (!isVisible () || !isEnabled ()) return false; event.doit = mnemonicMatch (event.character); return traverse (event); }