@Override public void validateData() { super.validateData(); if (getColumnCount() < 3) { throw new RuntimeException( Messages.getInstance() .getErrorString("BubbleChartFactory.ERROR_0001_XYZ_COLUMN_COUNT")); // $NON-NLS-1$ } }
@Override public void setupStyles() { super.setupStyles(); barchartstyle = BARCHART_STYLE_DEFAULT; // 3d Node temp = chartNode.selectSingleNode(IS3D_NODE_LOC); if (getValue(temp) != null && "true".equals(getValue(temp))) { // $NON-NLS-1$ barchartstyle = BarChart.Style.THREED; // also load 3d height temp = chartNode.selectSingleNode(HEIGHT_3D_NODE_LOC); if (getValue(temp) != null) { threedheight = Integer.parseInt(getValue(temp)); } } // Glass temp = chartNode.selectSingleNode(ISGLASS_NODE_LOC); if (getValue(temp) != null && "true".equals(getValue(temp))) { // $NON-NLS-1$ barchartstyle = BarChart.Style.GLASS; } // Sketch temp = chartNode.selectSingleNode(ISSKETCH_NODE_LOC); if (getValue(temp) != null && "true".equals(getValue(temp))) { // $NON-NLS-1$ issketch = true; // Also load fun factor temp = chartNode.selectSingleNode(FUN_FACTOR_NODE_LOC); if (getValue(temp) != null) { sketchBarFunFactor = Integer.parseInt(getValue(temp)); } else { sketchBarFunFactor = SKETCH_FUNFACTOR_DEFAULT; } } else { issketch = false; } // Stacked temp = chartNode.selectSingleNode(ISSTACKED_NODE_LOC); if (getValue(temp) != null) { isstacked = "true".equals(getValue(temp)); // $NON-NLS-1$ } temp = chartNode.selectSingleNode(OUTLINE_COLOR_PALETTE_NODE_LOC); if (temp != null) { Object[] colorNodes = temp.selectNodes(COLOR_NODE_LOC).toArray(); for (int j = 0; j < colorNodes.length; j++) { outlineColors.add(getValue((Node) colorNodes[j])); } } else { for (int i = 0; i < COLORS_DEFAULT.length; i++) { outlineColors.add(COLORS_DEFAULT[i]); } } }
@Override protected void setupStyles() { super.setupStyles(); // max bubble x Number maxX = 0; int rowCount = getRowCount(); for (int row = 0; row < rowCount; row++) { Number currx = (Number) getValueAt(row, 2); if (maxX.doubleValue() < currx.doubleValue()) { maxX = currx; } } bubbleMaxX = maxX; // max bubble size Node bubbleSizeNode = chartNode.selectSingleNode(MAX_BUBBLE_SIZE_NODE_LOC); if (getValue(bubbleSizeNode) != null) { maxBubbleSize = Integer.parseInt(getValue(bubbleSizeNode)); } }