private void search() { if (win.getHeight() < RESULT_HEIGHT) { win.setHeight(RESULT_HEIGHT); } win.show(); win.center(); results.search(searchInput.getText()); }
protected void onUserDefinedTabAdded() { final Window window = new Window(); window.setTitle("Create your own tab"); window.setClosable(true); window.setPaddings(7); window.setCloseAction(Window.HIDE); window.add(new CreateUserDefinedTabForm(window)); window.show(); }
protected void onSelectEntity() { if (selectWindow == null) { selectWindow = new com.gwtext.client.widgets.Window(); selectWindow.setTitle(getFieldLabel()); selectWindow.setWidth(600); selectWindow.setHeight(480); selectWindow.setMinWidth(300); selectWindow.setMinHeight(350); selectWindow.setLayout(new FitLayout()); selectWindow.setPaddings(5); selectWindow.setButtonAlign(Position.CENTER); // window.setCloseAction(Window.HIDE); selectWindow.setPlain(true); com.gwtext.client.widgets.Button cancelButton = new com.gwtext.client.widgets.Button("Cancel"); cancelButton.addListener( new ButtonListenerAdapter() { @Override public void onClick(Button button, EventObject e) { selectWindow.hide(); } }); com.gwtext.client.widgets.Button selectButton = new com.gwtext.client.widgets.Button("Select"); selectButton.addListener( new ButtonListenerAdapter() { @Override public void onClick(Button button, EventObject e) { Collection<EntityData> selection = getSelectable().getSelection(); if (selection == null || selection.size() == 0) { MessageBox.alert( "No selection", "No class selected. Please select a class from the tree."); return; } setClsValues(selection); selectWindow.hide(); } }); selectWindow.add(getSelectable()); selectWindow.addButton(selectButton); selectWindow.addButton(cancelButton); } if (!selectWindow.isVisible()) { selectWindow.show(); selectWindow.center(); } }