@Override public void execute(final ActionEvent event) { buildControl(); buildPanel.setVisible(true); triggerConfigSet.setVisible(true); } });
@Override public void execute(final ActionEvent event) { innerTarget.setVisible(ajaxToggle.isSelected()); } });
/** * reset the container that holds the grid layout and create a new grid layout with the appropriate properties. */ private void applySettings() { container.reset(); // Now show an example of the number of different columns WPanel gridLayoutPanel = new WPanel(); if (cbResponsive.isSelected()) { gridLayoutPanel.setHtmlClass(HtmlClassProperties.RESPOND); } GridLayout layout = new GridLayout(rowCount.getValue().intValue(), columnCount.getValue() .intValue(), hGap.getValue().intValue(), vGap.getValue().intValue() ); gridLayoutPanel.setLayout(layout); addBoxes(gridLayoutPanel, boxCount.getValue().intValue()); // give approx 3 rows, with a different number // of boxes on the final row container.add(gridLayoutPanel); gridLayoutPanel.setVisible(cbVisible.isSelected()); }
@Override protected void preparePaintComponent(final Request request) { super.preparePaintComponent(request); boolean isHeader = panel.getType() == WPanel.Type.HEADER; heading.setVisible(isHeader); utilBar.setVisible(isHeader && showUtilBar.isSelected()); menu.setVisible(isHeader && showMenu.isSelected()); panelContentRO.setVisible(!isHeader); }
/** * Updates the visibility and options present in the region selector, depending on the state selector's value. */ private void updateRegion() { actMessagePanel.setVisible(false); if (rbtACT.isSelected()) { actMessagePanel.setVisible(true); regionFields.setVisible(true); regionSelector.setOptions(new String[]{null, "Belconnen", "City", "Woden"}); regionSelector.setVisible(true); } else if (rbtNSW.isSelected()) { regionFields.setVisible(true); regionSelector.setOptions( new String[]{null, "Hunter", "Riverina", "Southern Tablelands"}); regionSelector.setVisible(true); } else if (rbtVIC.isSelected()) { regionFields.setVisible(true); regionSelector.setOptions( new String[]{null, "Gippsland", "Melbourne", "Mornington Peninsula"}); regionSelector.setVisible(true); } else { regionSelector.setOptions(new Object[]{null}); regionSelector.setVisible(false); regionFields.setVisible(false); } } }
/** * Start load. */ private void startLoad() { tableLayout.setVisible(true); List<PersonBean> beans = ExampleDataUtil.createExampleData(numRows.getNumber().intValue(), numDocs.getNumber() .intValue()); if (isLoadWTable()) { table.setBean(beans); } if (isLoadWDataTable()) { TableTreeNode tree = createTree(beans); datatable.setDataModel(new SimpleBeanTreeTableDataModel( new String[]{"firstName", "lastName", "dateOfBirth"}, tree)); } if (isLoadWTable()) { ajax2.setVisible(true); tableShim.setVisible(isLoadWTable()); } else { ajax4.setVisible(true); dataShim.setVisible(isLoadWDataTable()); } }
/** * Add some UI to a "utility bar" type structure. */ private void setUpUtilBar() { utilBar.setLayout(new ListLayout(ListLayout.Type.FLAT, ListLayout.Alignment.RIGHT, ListLayout.Separator.NONE, false)); WTextField selectOther = new WTextField(); selectOther.setToolTip("Enter text."); utilBar.add(selectOther); utilBar.add(new WButton("Go")); utilBar.add(new WButton("A")); utilBar.add(new WButton("B")); utilBar.add(new WButton("C")); utilBar.setVisible(false); }
add(buildPanel); buildPanel.setVisible(false);
final WPanel innerTarget = new WPanel(WPanel.Type.FEATURE); innerTarget.setVisible(false); ajaxToggle.setActionOnChange(new Action() { @Override
tableLayout.setLayout(new ColumnLayout(new int[]{50, 50}, 6, 6)); tableLayout.setMargin(new Margin(Size.LARGE, null, Size.LARGE, null)); tableLayout.setVisible(false); tablePanel.add(tableLayout);