Search in sources :

Example 56 with G_Panel

use of main.swing.generic.components.G_Panel in project Eidolons by IDemiurge.

the class WrappedContainer method refresh.

@Override
public void refresh() {
    clearCustomComps();
    removeAll();
    resetComps();
    addCustomComps();
    spaceTaken = 0;
    int i = 0;
    estimateSizes();
    for (G_Panel sub : comps) {
        G_Panel comp = customComps.get(i);
        if (comp != null) {
            spaceTaken = addComp(comp, true);
        }
        spaceTaken = addComp(sub, false);
        i++;
    }
    // panelSize = new Dimension(width, height);
    refreshComponents();
}
Also used : G_Panel(main.swing.generic.components.G_Panel)

Example 57 with G_Panel

use of main.swing.generic.components.G_Panel in project Eidolons by IDemiurge.

the class MiniGrid method init.

public void init() {
    // another canvas?
    comp = new G_Panel();
    comp.addMouseWheelListener(mouseWheelListener);
    comp.addMouseMotionListener(mouseMotionListener);
    // comp.addMouseListener(customMouseListener);
    LogMaster.log(1, getComp().getMouseListeners() + " on " + getComp().hashCode());
    // comp.addMouseMotionListener(new DragOffsetMouseListener(this));
    setCellWidth((int) (getSize().getWidth() / dungeon.getCellsX()));
    cellHeight = (int) (getSize().getHeight() / dungeon.getCellsY());
    // maximum possible size for square dimensions
    setCellWidth(Math.min(getCellWidth(), cellHeight));
    originalCellWidth = cellWidth;
    cellHeight = Math.min(getCellWidth(), cellHeight);
    originalCellHeight = cellHeight;
    overlayingObjHeight = cellHeight / 3 * 2;
    overlayingObjWidth = getCellWidth() / 3 * 2;
    resetDefaultOffset();
    resetComponents();
}
Also used : G_Panel(main.swing.generic.components.G_Panel)

Example 58 with G_Panel

use of main.swing.generic.components.G_Panel in project Eidolons by IDemiurge.

the class DebugPanel method initGUI.

private void initGUI() {
    // KEY LISTENER!
    logPanel = new G_LogPanel();
    buttonPanel = new FunctionPanel(master);
    inputPanel = new G_InputPanel();
    ip = new DC_InfoPanel(null, null, DC_Game.game.getState());
    G_Panel panel = new G_Panel();
    panel.setBackground(ColorManager.getTranslucent());
    panel.setOpaque(false);
    panel.add(ip, "id ip, pos 0 0");
    panel.add(buttonPanel, "id btns, pos ip.x2 0");
    frame.add(panel);
    // setUndecorated(true);
    // setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
    frame.setSize(new Dimension(getPanelWidth(), getPanelHeight()));
    frame.setVisible(true);
    frame.addWindowListener(new WindowListener() {

        @Override
        public void windowOpened(WindowEvent e) {
        }

        @Override
        public void windowIconified(WindowEvent e) {
        }

        @Override
        public void windowDeiconified(WindowEvent e) {
        }

        @Override
        public void windowDeactivated(WindowEvent e) {
        }

        @Override
        public void windowClosing(WindowEvent e) {
        }

        @Override
        public void windowClosed(WindowEvent e) {
            frame.setVisible(false);
        }

        @Override
        public void windowActivated(WindowEvent e) {
        }
    });
}
Also used : G_LogPanel(main.swing.panels.misc.G_LogPanel) G_InputPanel(main.swing.panels.misc.G_InputPanel) WindowListener(java.awt.event.WindowListener) G_Panel(main.swing.generic.components.G_Panel) WindowEvent(java.awt.event.WindowEvent) DC_InfoPanel(eidolons.swing.components.panels.DC_InfoPanel)

Example 59 with G_Panel

use of main.swing.generic.components.G_Panel in project Eidolons by IDemiurge.

the class MainMenu method init.

private void init() {
    panelSize = (GuiManager.DEF_DIMENSION);
    setBackground(Color.black);
    setOpaque(true);
    itemPanel = new G_Panel(FRAME);
    X = (GuiManager.DEF_DIMENSION.getWidth() - VISUALS.MENU_ITEM.getWidth()) / 2;
    Y = (int) ((GuiManager.DEF_DIMENSION.getHeight() - FRAME.getHeight()) / 2);
    itemPanel.setPanelSize(FRAME.getSize());
    add(itemPanel, "pos " + X + " " + Y);
}
Also used : G_Panel(main.swing.generic.components.G_Panel)

Aggregations

G_Panel (main.swing.generic.components.G_Panel)59 CustomButton (eidolons.swing.components.buttons.CustomButton)6 List (java.util.List)4 PARAMETER (main.content.values.parameters.PARAMETER)4 ObjType (main.entity.type.ObjType)4 TextComp (main.swing.components.TextComp)4 ArrayList (java.util.ArrayList)3 XLinkedMap (main.data.XLinkedMap)3 MigLayout (net.miginfocom.swing.MigLayout)3 PoolComp (eidolons.client.cc.gui.misc.PoolComp)2 HC_Tab (eidolons.client.cc.gui.neo.tabs.HC_Tab)2 HC_TabPanel (eidolons.client.cc.gui.neo.tabs.HC_TabPanel)2 WrappedTextComp (eidolons.swing.components.panels.page.log.WrappedTextComp)2 MusicList (main.music.entity.MusicList)2 MusicListPanel (main.music.gui.MusicListPanel)2 G_Component (main.swing.generic.components.G_Component)2 GraphicComponent (main.swing.generic.components.misc.GraphicComponent)2 PortraitComp (eidolons.client.cc.gui.neo.header.PortraitComp)1 HC_PagedListPanel (eidolons.client.cc.gui.pages.HC_PagedListPanel)1 PartyComp (eidolons.game.module.adventure.gui.map.obj.PartyComp)1