@Override public void setText( String text ) { table.setText( row, column, text ); }
@Override public void setText( String text ) { table.setText( row, column, text ); }
/** * Additional styling options. */ private Grid makeStylePanel() { final Grid grid = new Grid(5, 3); grid.setText(0, 1, "Smooth"); grid.setWidget(0, 2, smooth); return grid; }
/** * Builds the panel containing customizations for the axes of the graph. */ private Grid makeAxesPanel() { final Grid grid = new Grid(5, 3); grid.setText(0, 1, "Y"); grid.setText(0, 2, "Y2"); setTextAlignCenter(grid.getRowFormatter().getElement(0)); grid.setText(1, 0, "Label"); grid.setWidget(1, 1, ylabel); grid.setWidget(1, 2, y2label); grid.setText(2, 0, "Format"); grid.setWidget(2, 1, yformat); grid.setWidget(2, 2, y2format); grid.setText(3, 0, "Range"); grid.setWidget(3, 1, yrange); grid.setWidget(3, 2, y2range); grid.setText(4, 0, "Log scale"); grid.setWidget(4, 1, ylog); grid.setWidget(4, 2, y2log); setTextAlignCenter(grid.getCellFormatter().getElement(4, 1)); setTextAlignCenter(grid.getCellFormatter().getElement(4, 2)); return grid; }
private Widget getRuleAttributesPanel() { ruleAttributesGrid = new Grid(2, 4); ruleAttributesGrid.setCellSpacing(5); ruleAttributesGrid.setCellPadding(5); ruleAttributesGrid.setText(0, 0, GuidedScoreCardConstants.INSTANCE.ruleFlowGroup()); ruleAttributesGrid.setText(0, 1, GuidedScoreCardConstants.INSTANCE.agendaGroup()); final String ruleFlowGroup = model.getRuleFlowGroup(); final String agendaGroup = model.getAgendaGroup(); tbRuleFlowGroup = TextBoxFactory.getTextBox(DataType.TYPE_STRING); if (!(ruleFlowGroup == null || ruleFlowGroup.isEmpty())) { tbRuleFlowGroup.setText(ruleFlowGroup); } tbAgendaGroup = TextBoxFactory.getTextBox(DataType.TYPE_STRING); if (!(agendaGroup == null || agendaGroup.isEmpty())) { tbAgendaGroup.setText(agendaGroup); } ruleAttributesGrid.setWidget(1, 0, tbRuleFlowGroup); ruleAttributesGrid.setWidget(1, 1, tbAgendaGroup); return ruleAttributesGrid; }
private Widget getRuleAttributesPanel() { ruleAttributesGrid = new Grid(2, 4); ruleAttributesGrid.setCellSpacing(5); ruleAttributesGrid.setCellPadding(5); ruleAttributesGrid.setText(0, 0, GuidedScoreCardConstants.INSTANCE.ruleFlowGroup()); ruleAttributesGrid.setText(0, 1, GuidedScoreCardConstants.INSTANCE.agendaGroup()); final String ruleFlowGroup = model.getRuleFlowGroup(); final String agendaGroup = model.getAgendaGroup(); tbRuleFlowGroup = TextBoxFactory.getTextBox(DataType.TYPE_STRING); if (!(ruleFlowGroup == null || ruleFlowGroup.isEmpty())) { tbRuleFlowGroup.setText(ruleFlowGroup); } tbAgendaGroup = TextBoxFactory.getTextBox(DataType.TYPE_STRING); if (!(agendaGroup == null || agendaGroup.isEmpty())) { tbAgendaGroup.setText(agendaGroup); } ruleAttributesGrid.setWidget(1, 0, tbRuleFlowGroup); ruleAttributesGrid.setWidget(1, 1, tbAgendaGroup); return ruleAttributesGrid; }
@Override public void setFeature(Feature feature) { // Clear the current panel: contentPanel.clear(); // Layout the attributes of the feature in a grid: Grid grid = new Grid(feature.getLayer().getAttributeDescriptors().size(), 3); CellFormatter formatter = grid.getCellFormatter(); int i = 0; for (AttributeDescriptor descriptor : feature.getLayer().getAttributeDescriptors()) { // Put the attribute label in the first column: grid.setText(i, 0, getAttributeLabel(feature, descriptor)); formatter.getElement(i, 0).addClassName(resource.css().attributeLabel()); // Put a delimiter in the second column: grid.setText(i, 1, getDelimiter()); // Create a widget for the attribute value and put it in the last column: Widget attributeWidget = ATTRIBUTE_FACTORY.createAttributeWidget(feature, descriptor); attributeWidget.getElement().addClassName(resource.css().attributeValue()); grid.setWidget(i, 2, attributeWidget); i++; } contentPanel.add(grid); }
tbBaselineScore = TextBoxFactory.getTextBox(DataType.TYPE_NUMERIC_DOUBLE); scorecardPropertiesGrid.setText(0, 0, GuidedScoreCardConstants.INSTANCE.facts()); scorecardPropertiesGrid.setText(0, 1, GuidedScoreCardConstants.INSTANCE.resultantScoreField()); scorecardPropertiesGrid.setText(0, 2, GuidedScoreCardConstants.INSTANCE.initialScore()); tbInitialScore); scorecardPropertiesGrid.setText(2, 0, GuidedScoreCardConstants.INSTANCE.useReasonCodes()); scorecardPropertiesGrid.setText(2, 1, GuidedScoreCardConstants.INSTANCE.resultantReasonCodesField()); scorecardPropertiesGrid.setText(2, 2, GuidedScoreCardConstants.INSTANCE.reasonCodesAlgorithm()); scorecardPropertiesGrid.setText(2, 3, GuidedScoreCardConstants.INSTANCE.baselineScore());
tbBaselineScore = TextBoxFactory.getTextBox(DataType.TYPE_NUMERIC_DOUBLE); scorecardPropertiesGrid.setText(0, 0, GuidedScoreCardConstants.INSTANCE.facts()); scorecardPropertiesGrid.setText(0, 1, GuidedScoreCardConstants.INSTANCE.resultantScoreField()); scorecardPropertiesGrid.setText(0, 2, GuidedScoreCardConstants.INSTANCE.initialScore()); tbInitialScore); scorecardPropertiesGrid.setText(2, 0, GuidedScoreCardConstants.INSTANCE.useReasonCodes()); scorecardPropertiesGrid.setText(2, 1, GuidedScoreCardConstants.INSTANCE.resultantReasonCodesField()); scorecardPropertiesGrid.setText(2, 2, GuidedScoreCardConstants.INSTANCE.reasonCodesAlgorithm()); scorecardPropertiesGrid.setText(2, 3, GuidedScoreCardConstants.INSTANCE.baselineScore());