use of main.swing.generic.services.listener.MouseClickListener in project Eidolons by IDemiurge.
the class G_ScrolledPanel method addArrows.
protected void addArrows(final boolean forward) {
String y;
String x;
// if (forward) {
y = vertical ? "" + spaceTaken : "center_y@";
x = !vertical ? "" + spaceTaken : "center_x@";
// } else {
// y = vertical ? "0" : "center_y@";
// x = !vertical ? "0" : "center_x@";
// }
String pos = "pos " + x + " " + y;
GraphicComponent arrow = new GraphicComponent(getArrowImage(forward));
arrow.addMouseListener(new MouseClickListener() {
public void mouseClicked(MouseEvent arg0) {
arrowPressed(forward);
}
});
add(arrow, pos);
spaceTaken += (vertical ? getArrowImage(true).getHeight(null) : getArrowImage(true).getWidth(null));
}
use of main.swing.generic.services.listener.MouseClickListener in project Eidolons by IDemiurge.
the class G_TabbedPagePanel method createTab.
protected Component createTab(E sub, final int i) {
TextComp textComp = new TextComp(sub.toString(), Color.black) {
@Override
public int getBorderWidth() {
return 1;
}
@Override
public Color getBorderColor() {
return currentIndex == i ? ColorManager.ESSENCE : super.getBorderColor();
}
@Override
public int getPanelHeight() {
return super.getPanelHeight() * 2 / 3;
}
};
// textComp.getde
textComp.addMouseListener(new MouseClickListener() {
@Override
public void mouseClicked(MouseEvent arg0) {
tabClicked(i);
}
});
return textComp;
}
Aggregations