public void paint(Graphics g) {
super.paint(g);
Graphics2D g2;
DPoint graphOrigin;
g2 = (Graphics2D) g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
g2.setColor(LINES_COLOR);
try {
graphOrigin = new DPoint(GRAPH_LEFT_MARGIN, getHeight()
- GRAPH_BOTTOM_MARGIN);
plane = new CartesianPositivePlane(
g2,
graphOrigin,
(int) (getWidth() - GRAPH_LEFT_MARGIN - GRAPH_RIGHT_MARGIN),
(int) (getHeight() - GRAPH_TOP_MARGIN - GRAPH_BOTTOM_MARGIN),
xMaxValue, yMaxValue);
} catch (Exception e) {
return;
}
fillArea(g2, data.getResults().getAllConvex(), Color.orange);
for (Point2D p : data.getResults().getDominants()) {
drawMaskedOffRectangle(g2, p, new Color(255, 250, 120));
}
drawArea(g2, data.getResults().getAllConvex(), Color.gray);
if (showAllLabels) {
drawPoint(g2, data.getResults().getDominants(), Color.blue,
getPointSize() + 1);
drawPoint(g2, data.getResults().getDominates(), new Color(15, 185,
100), getPointSize() + 1);
drawPoint(g2, data.getResults().getFiltDominants(), Color.black,
getPointSize() + 1);
drawPoint(g2, data.getResults().getFiltDominates(), Color.gray,
getPointSize() + 1);
drawPoint(g2, data.getResults().getFiltConvex(), Color.black,
getPointSize() + 1);
pointLabel(g2, data.getResults().getPoints());
} else {
pointLabel(g2, data.getResults().getConvex());
}
drawPoint(g2, data.getResults().getConvex(), Color.red,
getPointSize() + 3);
if (selectedConvexSegment != null) {
drawSelectLine(g2, selectedConvexSegment.getP1(),
selectedConvexSegment.getP2());
}
summary(g2);
/*
* // drawSelectLine(g2, lineP1, lineP2, s3d, // data.getClassNames());
* drawDominantArrow(g2, data.getResults().getDominants(),
* data.getResults().getDominates()); drawFiltArea(g2,
* data.getResults().getFilteredArea());
*/
g2.setColor(LINES_COLOR);
ArrayList<DPoint> points = new ArrayList<DPoint>();
for (int i = 0; i <= NUM_OF_MARK_ON_X_AXIS; i++) {
points.add(new DPoint(i * xMaxValue / NUM_OF_MARK_ON_X_AXIS, 0));
}
plane.drawValuesOnXAxis(points);
points = new ArrayList<DPoint>();
for (int i = NUM_OF_MARK_ON_Y_AXIS; i > 0; i--) {
points.add(new DPoint(0, i * yMaxValue / NUM_OF_MARK_ON_Y_AXIS));
}
plane.drawValuesOnYAxis(points);
plane.draw(data.getClassNames()[0], data.getClassNames()[1]);
if (filtering || unFiltering) {