com.google.gwt.user.client.ui.FocusWidget Java Examples

The following examples show how to use com.google.gwt.user.client.ui.FocusWidget. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ETLGrid.java    From EasyML with Apache License 2.0 4 votes vote down vote up
public void lock(){
	for( FocusWidget wgt : paramBoxs ){
		wgt.setEnabled( false );
	}
}
 
Example #2
Source File: ETLGrid.java    From EasyML with Apache License 2.0 4 votes vote down vote up
public void unlock(){
	for( FocusWidget wgt : paramBoxs ){
		wgt.setEnabled( true );
	}
}
 
Example #3
Source File: ParameterPanel.java    From EasyML with Apache License 2.0 4 votes vote down vote up
public List<FocusWidget> getParamBoxs() {
	return paramBoxs;
}
 
Example #4
Source File: ParameterPanel.java    From EasyML with Apache License 2.0 4 votes vote down vote up
public void setParamBoxs(List<FocusWidget> paramBoxs) {
	this.paramBoxs = paramBoxs;
}
 
Example #5
Source File: ParameterPanel.java    From EasyML with Apache License 2.0 4 votes vote down vote up
public void lock(){
	for( FocusWidget wgt : paramBoxs ){
		wgt.setEnabled( false );
	}
}
 
Example #6
Source File: ParameterPanel.java    From EasyML with Apache License 2.0 4 votes vote down vote up
public void unlock(){
	for( FocusWidget wgt : paramBoxs ){
		wgt.setEnabled( true );
	}
}
 
Example #7
Source File: Tools.java    From cuba with Apache License 2.0 4 votes vote down vote up
public static void showPopup(VOverlay overlay, int left, int top) {
    overlay.setAutoHideEnabled(true);
    overlay.setVisible(false);
    overlay.show();

    Widget widget = overlay.getWidget();
    if (widget instanceof VVerticalLayout) {
        resetItemSelection(widget);

        VVerticalLayout verticalLayout = (VVerticalLayout) widget;
        if (verticalLayout.getStyleName().contains(CUBA_CONTEXT_MENU_CONTAINER)) {
            int widgetCount = verticalLayout.getWidgetCount();
            if (widgetCount > 1) {
                Widget verticalSlot = verticalLayout.getWidget(0);
                Widget buttonWidget = ((Slot) verticalSlot).getWidget();
                buttonWidget.addStyleName(SELECTED_ITEM_STYLE);
                if (buttonWidget instanceof FocusWidget) {
                    ((FocusWidget) buttonWidget).setFocus(true);
                }
            }
        }
    }

    // mac FF gets bad width due GWT popups overflow hacks,
    // re-determine width
    int offsetWidth = overlay.getOffsetWidth();
    int offsetHeight = overlay.getOffsetHeight();
    if (offsetWidth + left > Window.getClientWidth()) {
        left = left - offsetWidth;
        if (left < 0) {
            left = 0;
        }
    }
    if (offsetHeight + top > Window.getClientHeight()) {
        top = top - offsetHeight;
        if (top < 0) {
            top = 0;
        }
    }

    overlay.setPopupPosition(left, top);
    overlay.setVisible(true);
}