/** * Removes the component specified by its cell coordinates. * * @param column * the component's column, starting from 0. * @param row * the component's row, starting from 0. */ public void removeComponent(int column, int row) { // Finds the area for (final Component component : components) { final ChildComponentData childData = getState().childData .get(component); if (childData.column1 == column && childData.row1 == row) { removeComponent(component); return; } } }
@Override public void replaceComponent(Component oldComponent, Component newComponent) { // Gets the locations ChildComponentData oldLocation = getState().childData.get(oldComponent); ChildComponentData newLocation = getState().childData.get(newComponent); if (oldLocation == null) { addComponent(newComponent); } else if (newLocation == null) { removeComponent(oldComponent); addComponent(newComponent, oldLocation.column1, oldLocation.row1, oldLocation.column2, oldLocation.row2); } else { int oldAlignment = oldLocation.alignment; oldLocation.alignment = newLocation.alignment; newLocation.alignment = oldAlignment; getState().childData.put(newComponent, oldLocation); getState().childData.put(oldComponent, newLocation); } }
public void buttonClick(ClickEvent event) { valueMap.remove(key); mapLayout.removeComponent(keyLabel); mapLayout.removeComponent(valueLabel); mapLayout.removeComponent(keyField); mapLayout.removeComponent(valueField); mapLayout.removeComponent(removeButton); mapTextFields.remove(mapKey); } });
public void buttonClick(ClickEvent event) { valueMap.remove(key); mapLayout.removeComponent(keyLabel); mapLayout.removeComponent(valueLabel); mapLayout.removeComponent(keyField); mapLayout.removeComponent(valueField); mapLayout.removeComponent(removeButton); mapTextFields.remove(mapKey); } });
public void buttonClick(ClickEvent event) { valueList.remove(value); listLayout.removeComponent(valueLabel); listLayout.removeComponent(valueField); listLayout.removeComponent(removeButton); valueTextFields.remove(mapKey); } });
private void maximizeSwTable() { mainLayout.removeComponent(filterByDSTypeLayout); mainLayout.removeComponent(distributionTableLayout); mainLayout.setColumnExpandRatio(2, 1F); mainLayout.setColumnExpandRatio(0, 0F); mainLayout.setColumnExpandRatio(1, 0F); }
protected void setDetailComponent(Component detail) { if(grid.getComponent(1, 1) != null) { grid.removeComponent(1, 1); } if(detail != null) { grid.addComponent(detail, 1, 1, 1, 2); } }
public void setToggleButton(Component toggleButton) { this.layout.removeComponent(this.toggleButton); this.toggleButton = toggleButton; this.layout.addComponent(this.toggleButton, 0, 0); this.layout.setComponentAlignment(this.toggleButton, Alignment.MIDDLE_LEFT); }
private void maximizeDistTable() { if (permChecker.hasTargetReadPermission()) { mainLayout.removeComponent(targetTagFilterLayout); mainLayout.removeComponent(targetTableLayout); mainLayout.removeComponent(actionHistoryLayout); removeComponent(countMessageLabel); } mainLayout.setColumnExpandRatio(0, 0F); mainLayout.setColumnExpandRatio(1, 0F); mainLayout.setColumnExpandRatio(2, 1F); mainLayout.setColumnExpandRatio(4, 0F); }
private void maximizeSwTable() { mainLayout.removeComponent(detailAndUploadLayout); mainLayout.setColumnExpandRatio(1, 1F); mainLayout.setColumnExpandRatio(2, 0F); }
private void maximizeTargetTable() { if (permChecker.hasReadRepositoryPermission()) { mainLayout.removeComponent(distributionTableLayout); mainLayout.removeComponent(distributionTagLayout); } mainLayout.removeComponent(actionHistoryLayout); removeComponent(countMessageLabel); mainLayout.setColumnExpandRatio(1, 1F); mainLayout.setColumnExpandRatio(2, 0F); mainLayout.setColumnExpandRatio(3, 0F); mainLayout.setColumnExpandRatio(4, 0F); }
private void maximizeArtifactoryDetails() { mainLayout.setSpacing(false); mainLayout.removeComponent(filterByTypeLayout); mainLayout.removeComponent(smTableLayout); detailAndUploadLayout.removeComponent(dropAreaLayout.getDropAreaWrapper()); mainLayout.setColumnExpandRatio(1, 0F); mainLayout.setColumnExpandRatio(2, 1F); }
private void maximizeArtifactoryDetails() { mainLayout.setSpacing(false); mainLayout.removeComponent(filterByTypeLayout); mainLayout.removeComponent(smTableLayout); detailAndUploadLayout.removeComponent(dropAreaLayout.getDropAreaWrapper()); mainLayout.setColumnExpandRatio(1, 0F); mainLayout.setColumnExpandRatio(2, 1F); }
public void buttonClick(Button.ClickEvent event) { start(); layout.removeComponent(startButton); layout.addComponent(stopButton, 1, 3); layout.setComponentAlignment(stopButton, Alignment.MIDDLE_LEFT); statusIconLabel.setCaption(runningIcon.getHtml()); refresh(); } });
public void buttonClick(ClickEvent event) { notifierService.start(); layout.removeComponent(startButton); layout.addComponent(stopButton, 1, 3); layout.setComponentAlignment(stopButton, Alignment.MIDDLE_LEFT); statusIconLabel.setCaption(runningIcon.getHtml()); notificationIntervalLabel.setCaption(Integer.toString(notifierService.getNotificationInterval())); } });
public void buttonClick(ClickEvent event) { notifierService.stop(); layout.removeComponent(stopButton); layout.addComponent(startButton, 1, 3); layout.setComponentAlignment(startButton, Alignment.MIDDLE_LEFT); statusIconLabel.setCaption(stoppedIcon.getHtml()); } });
public void buttonClick(Button.ClickEvent event) { stop(); layout.removeComponent(stopButton); layout.addComponent(startButton, 1, 3); layout.setComponentAlignment(startButton, Alignment.MIDDLE_LEFT); statusIconLabel.setCaption(stoppedIcon.getHtml()); refresh(); } });
protected void setCurrentEditor(AttachmentEditor editor) { AttachmentEditorComponent component = editor.getEditor(null, taskId, processInstanceId); this.currentEditor = component; detailLayout.removeComponent(detailLayout.getComponent(0, 0)); if (currentEditor != null) { currentEditor.setSizeFull(); detailLayout.addComponent(currentEditor, 0, 0); okButton.setEnabled(true); } else { okButton.setEnabled(false); } }
public void refreshOwner() { task = taskService.createTaskQuery().taskId(task.getId()).singleResult(); peopleGrid.removeComponent(0, 0); peopleGrid.addComponent(createOwnerComponent(), 0, 0); }