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

📄 tabcontroller.java

📁 这是一个非常优秀的可以自己定义复杂任务调度配置的框架
💻 JAVA
字号:
/** *  This file is part of the jcrontab package *  Copyright (C) 2001-2004 Israel Olalla * *  This library is free software; you can redistribute it and/or *  modify it under the terms of the GNU Lesser General Public *  License as published by the Free Software Foundation; either *  version 2 of the License, or (at your option) any later version. * *  This library is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU *  Lesser General Public License for more details. * *  You should have received a copy of the GNU Lesser General Public *  License along with this library; if not, write to the Free *  Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, *  MA 02111-1307, USA * *  For questions, suggestions: * *  iolalla@yahoo.com * */package org.jcrontab.gui;import javax.swing.*;import java.awt.event.*;import java.awt.*;/** * This class is done to makeeasier to manage menus, in the future this class * could create the menus from an xml. * @author $Author: iolalla $ * @version $Revision: 1.6 $ */public class TabController {        private JPanel panel = null;        private JTabbedPane tabbedPane = null;    private int width;        private int heigth;        public TabController (int width, int heigth) {       panel  = new JPanel();               tabbedPane = new JTabbedPane();    }        public JPanel getPanel() {        //panel = new JPanel();        panel = new JPanel(new SpringLayout());        tabbedPane = new JTabbedPane();         //Sets the minimum size of the Panel        //Dimension minimumSize = new Dimension(780, 260);        Dimension minimumSize = new Dimension(width - 60, heigth - 60);        panel.setMinimumSize(minimumSize);        // Be carefull this should be initiliazed first        // basically cause when the system is reloaded the         // Configuration should be reloaded first....         // It's quite tricky and nasty, and in the future        // Should be done in other way        ConfigTab configFrame = new ConfigTab();                TasksTab tasksFrame = new TasksTab();        //this is the Tasks tab        tabbedPane.addTab("Tasks", tasksFrame);        // This is the config tab        tabbedPane.addTab("Config", configFrame);        //        tabbedPane.setSelectedIndex(0);                panel.setLayout(new GridLayout(1, 1));        panel.add(tabbedPane);        return panel;    }        public JTabbedPane getTAbbedPanel() {        return tabbedPane;    }        protected Component makeTextPanel(String text) {        JPanel panel = new JPanel(false);        JLabel filler = new JLabel(text);        filler.setHorizontalAlignment(JLabel.CENTER);        panel.add(filler);        return panel;    }}

⌨️ 快捷键说明

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