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

📄 optionsupdatejpanel.java

📁 JStock是一个免费股市软件
💻 JAVA
字号:
/* * OptionsSpeedJPanel.java * * Created on June 19, 2007, 8:42 PM * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program 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 * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. * * Copyright (C) 2008 Yan Cheng Cheok <yccheok@yahoo.com> */package org.yccheok.jstock.gui;/** * * @author yccheok */public class OptionsUpdateJPanel extends javax.swing.JPanel implements JStockOptionsObserver {    /** Creates new form OptionsUpdateJPanel */    public OptionsUpdateJPanel() {        initComponents();    }    /** This method is called from within the constructor to     * initialize the form.     * WARNING: Do NOT modify this code. The content of this method is     * always regenerated by the Form Editor.     */    @SuppressWarnings("unchecked")    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents    private void initComponents() {        jXHeader1 = new org.jdesktop.swingx.JXHeader();        jPanel1 = new javax.swing.JPanel();        jCheckBox1 = new javax.swing.JCheckBox();        setLayout(new java.awt.BorderLayout());        jXHeader1.setDescription("Whenever there is update on JStock, you will be automatically informed.");        jXHeader1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/32x32/epiphany-download.png"))); // NOI18N        jXHeader1.setTitle("Update");        add(jXHeader1, java.awt.BorderLayout.NORTH);        jCheckBox1.setText("Inform me when there is latest news on JStock");        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);        jPanel1.setLayout(jPanel1Layout);        jPanel1Layout.setHorizontalGroup(            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)            .addGroup(jPanel1Layout.createSequentialGroup()                .addContainerGap()                .addComponent(jCheckBox1)                .addContainerGap(145, Short.MAX_VALUE))        );        jPanel1Layout.setVerticalGroup(            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)            .addGroup(jPanel1Layout.createSequentialGroup()                .addContainerGap()                .addComponent(jCheckBox1)                .addContainerGap(204, Short.MAX_VALUE))        );        add(jPanel1, java.awt.BorderLayout.CENTER);    }// </editor-fold>//GEN-END:initComponents    // Variables declaration - do not modify//GEN-BEGIN:variables    private javax.swing.JCheckBox jCheckBox1;    private javax.swing.JPanel jPanel1;    private org.jdesktop.swingx.JXHeader jXHeader1;    // End of variables declaration//GEN-END:variables    public void set(JStockOptions jStockOptions) {        jCheckBox1.setSelected(jStockOptions.isAutoUpdateNewsEnabled());        MainFrame m = MainFrame.getMe();        if(m != null) {            m.initLatestNewsTask();        }    }    public boolean apply(JStockOptions jStockOptions) {        jStockOptions.setAutoUpdateNewsEnabled(jCheckBox1.isSelected());        return true;    }}

⌨️ 快捷键说明

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