⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exploreractiongroup.java

📁 基于Eclipse RCP模型下的文档管理程序源代码
💻 JAVA
字号:
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   ExplorerActionGroup.java

package fileexplorer.action;

import fileexplorer.system.fileImages;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.swt.custom.StackLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.actions.ActionGroup;

public class ExplorerActionGroup extends ActionGroup
{
    private class PrevAction extends Action
    {

        public void run()
        {
            if(container.getLayout() instanceof StackLayout)
            {
                if(((StackLayout)container.getLayout()).topControl == operateComp)
                    ((StackLayout)container.getLayout()).topControl = explorerComp;
                else
                    ((StackLayout)container.getLayout()).topControl = operateComp;
                container.layout();
            }
        }

        final ExplorerActionGroup this$0;

        public PrevAction()
        {
            this$0 = ExplorerActionGroup.this;
            super();
            setHoverImageDescriptor(fileImages.getImageDescriptor("PREV"));
            setText("\u5411\u524D\u5207\u6362");
        }
    }

    private class NextAction extends Action
    {

        public void run()
        {
            if(container.getLayout() instanceof StackLayout)
            {
                if(((StackLayout)container.getLayout()).topControl == operateComp)
                    ((StackLayout)container.getLayout()).topControl = explorerComp;
                else
                    ((StackLayout)container.getLayout()).topControl = operateComp;
                container.layout();
            }
        }

        final ExplorerActionGroup this$0;

        public NextAction()
        {
            this$0 = ExplorerActionGroup.this;
            super();
            setHoverImageDescriptor(fileImages.getImageDescriptor("NEXT"));
            setText("\u5411\u540E\u5207\u6362");
        }
    }


    public ExplorerActionGroup(Composite container, Composite explorerComp, Composite operateComp)
    {
        this.container = container;
        this.explorerComp = explorerComp;
        this.operateComp = operateComp;
    }

    public void fillActionBars(IActionBars actionBars)
    {
        IToolBarManager toolBar = actionBars.getToolBarManager();
        toolBar.add(new PrevAction());
        toolBar.add(new NextAction());
    }

    private Composite container;
    private Composite explorerComp;
    private Composite operateComp;



}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -