Search in sources :

Example 6 with TextComp

use of main.swing.components.TextComp in project Eidolons by IDemiurge.

the class GenericListChooser method initPanel.

protected void initPanel() {
    panel = new G_Panel();
    // if (list == null)
    initList();
    JScrollPane scroll = new JScrollPane(list);
    int height = getPanelHeight();
    int width = getPanelWidth();
    panel.setPanelSize(new Dimension(width, height));
    String listPanelHeight = height + "-40";
    scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    panel.add(scroll, "id list1, pos 0 0, h " + listPanelHeight + "!");
    if (secondList != null) {
        JScrollPane scroll2 = new JScrollPane(secondList);
        scroll2.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
        panel.add(scroll2, "id list2, pos list1.x2+50 0, h " + listPanelHeight + "!");
        // panel.add(buttonPanel, "id bp, pos 0 " + listPanelHeight);
        panel.add(buttonPanel, "id bp, pos 0 list2.y2");
    } else {
    // list.addMouseListener(listener);
    }
    if (tooltipMap == null) {
        tooltipMap = map;
        map = null;
    }
    toolTipPanel = new TextComp() {

        @Override
        protected Color getColor() {
            return Color.black;
        }
    };
    panel.add(toolTipPanel, "id tp, pos ip.x @max_y");
    toolTipMainPanel = new TextComp(tooltip) {

        @Override
        protected Color getColor() {
            return Color.black;
        }
    };
    panel.add(toolTipMainPanel, "id tmp, pos @max_x+(max_x*(-3)) 0");
    if (decorator == null) {
        decorator = panelDecorator;
        panelDecorator = null;
    }
    if (decorator != null) {
        decorator.addComponents(panel);
    }
}
Also used : G_Panel(main.swing.generic.components.G_Panel) TextComp(main.swing.components.TextComp)

Aggregations

TextComp (main.swing.components.TextComp)6 G_Panel (main.swing.generic.components.G_Panel)4 MouseEvent (java.awt.event.MouseEvent)1 MouseClickListener (main.swing.generic.services.listener.MouseClickListener)1