use of main.swing.generic.components.CompVisuals in project Eidolons by IDemiurge.
the class IconTextComp method init.
public void init() {
int width = image.getWidth(null);
int height = image.getHeight(null);
setVisuals(new CompVisuals(image));
graphicComp = createGraphicComponent();
add(graphicComp, "pos 0 0");
String relativeX = "@centered_x";
String relativeY = "@centered_y";
int x = 0;
int y = 0;
if (BooleanMaster.isTrue(textDirection.growX)) {
relativeX = "icon.x2";
x = textOffset;
}
if (BooleanMaster.isFalse(textDirection.growX)) {
relativeX = "";
x = -textOffset;
}
if (BooleanMaster.isTrue(textDirection.growY)) {
relativeY = "icon.y2";
y = textOffset;
}
if (BooleanMaster.isFalse(textDirection.growY)) {
relativeY = "";
y = -textOffset;
}
String pos = "pos " + relativeX + "+" + x + " " + relativeY + "+" + y;
textComp = createTextComp();
add(textComp, pos);
setPanelSize(new Dimension(width, height));
}
use of main.swing.generic.components.CompVisuals in project Eidolons by IDemiurge.
the class DungeonChoiceView method itemSelected.
@Override
public void itemSelected(ObjType i) {
super.itemSelected(i);
setVisuals(new CompVisuals(GuiManager.DEF_DIMENSION, getSelectedItem().getProperty(PROPS.MAP_BACKGROUND)));
init();
refresh();
// background
}
use of main.swing.generic.components.CompVisuals in project Eidolons by IDemiurge.
the class GatewayWindow method initBackgroundPanel.
private G_Panel initBackgroundPanel() {
Image img = getBackgroundPicture();
G_Panel panel = new G_Panel(new CompVisuals(img));
// img = DC_GameGUI.createBackgroundOverlay();
panel.add(new JLabel(new ImageIcon(img)));
return panel;
}
use of main.swing.generic.components.CompVisuals in project Eidolons by IDemiurge.
the class HT_ControlPanel method addControls.
private void addControls() {
viewModeButton = new CustomButton(new CompVisuals(STD_IMAGES.SEARCH.getImage())) {
@Override
public void handleClick() {
handleControl(VIEW_MODE);
}
};
viewModeButton.removeMouseListener(viewModeButton);
viewModeButton.addMouseListener(view);
add(viewModeButton);
}
use of main.swing.generic.components.CompVisuals in project Eidolons by IDemiurge.
the class HT_View method initTabPanel.
protected HC_TabPanel initTabPanel(List<HC_Tab> tabList) {
HC_TabPanel tabPanel = new HC_TabPanel(tabList) {
@Override
public void notifyListener() {
listener.tabSelected(getSelectedTabName());
}
@Override
public Component generateEmptyTabComp() {
return new GraphicComponent(ImageManager.getNewBufferedImage(getTabCompWidth(), getTabCompHeight()));
}
@Override
protected STD_SOUNDS getClickSound() {
return STD_SOUNDS.ON_OFF;
// return STD_SOUNDS.DIS__OPEN_MENU;
}
@Override
public Component getSelectedTabComponent() {
return super.getSelectedTabComponent();
}
@Override
public ComponentVisuals getTAB() {
// empty
if (TAB == null) {
TAB = new CompVisuals(ImageManager.getNewBufferedImage(getTabCompWidth(), getTabCompHeight()));
}
return TAB;
}
public int getPageSize() {
return getTabPageSize();
}
};
tabPanel.setChangeListener(this);
return tabPanel;
}
Aggregations