in taverna-wsdl-activity-ui/src/main/java/org/apache/taverna/activities/wsdl/views/WSDLActivityConfigurationView.java [402:443]
protected void addDivider(JComponent component, final int position, final boolean etched) {
component.setBorder(new Border() {
private final Color borderColor = new Color(.6f, .6f, .6f);
public Insets getBorderInsets(Component c) {
if (position == SwingConstants.TOP) {
return new Insets(5, 0, 0, 0);
} else {
return new Insets(0, 0, 5, 0);
}
}
public boolean isBorderOpaque() {
return false;
}
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
if (position == SwingConstants.TOP) {
if (etched) {
g.setColor(borderColor);
g.drawLine(x, y, x + width, y);
g.setColor(Color.WHITE);
g.drawLine(x, y + 1, x + width, y + 1);
} else {
g.setColor(Color.LIGHT_GRAY);
g.drawLine(x, y, x + width, y);
}
} else {
if (etched) {
g.setColor(borderColor);
g.drawLine(x, y + height - 2, x + width, y + height - 2);
g.setColor(Color.WHITE);
g.drawLine(x, y + height - 1, x + width, y + height - 1);
} else {
g.setColor(Color.LIGHT_GRAY);
g.drawLine(x, y + height - 1, x + width, y + height - 1);
}
}
}
});
}