AdminSectionExplorerAction.java

gui/src/net/sourceforge/pain/tools/guitool/action/admin/AdminSectionExplorerAction.java · 785 B

From the archive pain_0_44.tgz

Download the archive   « Back to the archive contents

package net.sourceforge.pain.tools.guitool.action.admin;

import net.sourceforge.pain.tools.guitool.*;
import net.sourceforge.pain.tools.guitool.action.*;

import javax.swing.*;
import java.awt.*;

public class AdminSectionExplorerAction implements GTAction {
    private static JEditorPane instance;

    public void executeAction() {
        try {
            GuiTool.appFrame.workspacePanel.setActiveComponent(getComponent());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private Component getComponent() throws Exception {
        if (instance == null) {
            instance = HtmlComponentRegistry.get(getClass());
            instance.addHyperlinkListener(new DefaultHyperlinkListenerImpl());
        }
        return instance;
    }

}

Site Stats

Snippets: 1791
Codebases: 571