/** * Moves the cursor forward by one. If the cursor goes out of the right grid * border, it is moved to the first column of the next row. * * @see #newLine() */ public void space() { cursorX++; if (cursorX >= getColumns()) { cursorX = 0; cursorY++; } }
if (getColumns() == columns) { return; if (getColumns() > columns) { for (Entry<Connector, ChildComponentData> entry : getState().childData .entrySet()) { if (columns < getColumns()) { for (int i = columns; i < getColumns(); i++) { columnExpandRatio.remove(i); getState().explicitColRatios.remove(i);
"Illegal coordinates for the component"); if (column1 < 0 || row1 < 0 || column2 >= getColumns() || row2 >= getRows()) { throw new OutOfBoundsException(area); if (cursorX >= getColumns()) {
@Override public void beforeClientResponse(boolean initial) { super.beforeClientResponse(initial); getState().colExpand = new float[getColumns()]; float colSum = getExpandRatioSum(columnExpandRatio); if (colSum == 0) { // no cols have been expanded for (int i = 0; i < getColumns(); i++) { getState().colExpand[i] = 1f; } } else { for (int i = 0; i < getColumns(); i++) { getState().colExpand[i] = getColumnExpandRatio(i); } } getState().rowExpand = new float[getRows()]; float rowSum = getExpandRatioSum(rowExpandRatio); if (rowSum == 0) { // no rows have been expanded for (int i = 0; i < getRows(); i++) { getState().rowExpand[i] = 1f; } } else { for (int i = 0; i < getRows(); i++) { getState().rowExpand[i] = getRowExpandRatio(i); } } }
if (cursorX >= getColumns()) { setColumns(cursorX + 1);
for (int col = 0; col < getColumns(); col++) { removeComponent(col, row);
@Override public void valueChange(Property.ValueChangeEvent valueChangeEvent) { recreateCells(m_gridLayout.getColumns(), Integer.valueOf(valueChangeEvent.getProperty().getValue().toString())); } });
@Override public void valueChange(Property.ValueChangeEvent valueChangeEvent) { recreateCells(m_gridLayout.getColumns(), Integer.valueOf(valueChangeEvent.getProperty().getValue().toString())); } });
for (int row = componentArea.getRow1(); row <= componentArea .getRow2(); row++) { for (int column = 0; column < gl.getColumns(); column++) { Component c = gl.getComponent(column, row); if (c != null) {
/** * Updates the preview images on timeframe changes. */ private void updatePreview() { /** * getting the timeframe values */ int timeFrameValue; int timeFrameType; try { timeFrameValue = Integer.parseInt(m_timeFrameValue.getValue().toString()); } catch (NumberFormatException numberFormatException) { timeFrameValue = 1; } try { timeFrameType = Integer.parseInt(m_timeFrameType.getValue().toString()); } catch (NumberFormatException numberFormatException) { timeFrameType = Calendar.HOUR; } for (int y = 0; y < m_gridLayout.getRows(); y++) { for (int x = 0; x < m_gridLayout.getColumns(); x++) { if (m_gridLayout.getComponent(x, y) != null) { ((RrdGraphEntry) m_gridLayout.getComponent(x, y)).setPreviewTimeFrame(timeFrameType, timeFrameValue); } } } }
/** * Updates the preview images on timeframe changes. */ private void updatePreview() { /** * getting the timeframe values */ int timeFrameValue; int timeFrameType; try { timeFrameValue = Integer.parseInt(m_timeFrameValue.getValue().toString()); } catch (NumberFormatException numberFormatException) { timeFrameValue = 1; } try { timeFrameType = Integer.parseInt(m_timeFrameType.getValue().toString()); } catch (NumberFormatException numberFormatException) { timeFrameType = Calendar.HOUR; } for (int y = 0; y < m_gridLayout.getRows(); y++) { for (int x = 0; x < m_gridLayout.getColumns(); x++) { if (m_gridLayout.getComponent(x, y) != null) { ((RrdGraphEntry) m_gridLayout.getComponent(x, y)).setPreviewTimeFrame(timeFrameType, timeFrameValue); } } } }
for (int x = 0; x < m_gridLayout.getColumns(); x++) { RrdGraphEntry rrdGraphEntry = (RrdGraphEntry) m_gridLayout.getComponent(x, y); m_dashletSpec.getParameters().put("nodeLabel" + i, rrdGraphEntry.getNodeLabel());
for (int x = 0; x < m_gridLayout.getColumns(); x++) { RrdGraphEntry rrdGraphEntry = (RrdGraphEntry) m_gridLayout.getComponent(x, y); m_dashletSpec.getParameters().put("nodeLabel" + i, rrdGraphEntry.getNodeLabel());
for (int x = 0; x < m_gridLayout.getColumns(); x++) { if (x >= columns || y >= rows) { m_gridLayout.removeComponent(x, y); for (int x = 0; x < m_gridLayout.getColumns(); x++) {
for (int x = 0; x < m_gridLayout.getColumns(); x++) { if (x >= columns || y >= rows) { m_gridLayout.removeComponent(x, y); for (int x = 0; x < m_gridLayout.getColumns(); x++) { if (m_gridLayout.getComponent(x, y) == null) { RrdGraphEntry rrdGraphEntry = new RrdGraphEntry(m_nodeDao, m_rrdGraphHelper, x, y);
for (int x = 0; x < m_gridLayout.getColumns(); x++) { String graphUrl = getDashletSpec().getParameters().get("graphUrl" + i);
for (int x = 0; x < m_gridLayout.getColumns(); x++) { if (x >= columns || y >= rows) { m_gridLayout.removeComponent(x, y); for (int x = 0; x < m_gridLayout.getColumns(); x++) {
for (int x = 0; x < m_gridLayout.getColumns(); x++) { if (x >= columns || y >= rows) { m_gridLayout.removeComponent(x, y); for (int x = 0; x < m_gridLayout.getColumns(); x++) { if (m_gridLayout.getComponent(x, y) == null) { RrdGraphEntry rrdGraphEntry = new RrdGraphEntry(m_nodeDao, m_rrdGraphHelper, x, y);
public void createUi(VaadinFormBuilder builder) { layout = new GridLayout(); layout.setColumns(((LayoutComposite)getElement()).getColumns()); log().i("grid",layout.getColumns()); layout.setWidth("100%"); layout.setSpacing(true); addToCurrent(builder); }
for (int x = 0; x < m_gridLayout.getColumns(); x++) { String graphUrl = getDashletSpec().getParameters().get("graphUrl" + i);