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

📄 securitypropertiesdialog.java

📁 EclipseTrader is a stock exchange analysis system, featuring shares pricing watch, intraday and hi
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
            noDefaultAndApplyButton();            setValid(false);        }        /* (non-Javadoc)         * @see net.sourceforge.eclipsetrader.core.ui.preferences.SecurityPropertiesDialog.FeedPage#createContents(org.eclipse.swt.widgets.Composite)         */        protected Control createContents(Composite parent)        {            Composite content = options.createControls(parent, security.getQuoteFeed());                        GridLayout gridLayout = new GridLayout(2, false);            gridLayout.marginWidth = gridLayout.marginHeight = 0;            content.setLayout(gridLayout);            setValid(true);                        return content;        }        /* (non-Javadoc)         * @see org.eclipse.jface.preference.PreferencePage#performOk()         */        public boolean performOk()        {            if (isValid())                security.setQuoteFeed(options.getFeed());            return super.performOk();        }    }        private class Level2FeedPage extends PreferencePage    {        FeedOptions options = new FeedOptions("level2"); //$NON-NLS-1$        public Level2FeedPage()        {            super(Messages.SecurityPropertiesDialog_Level2Page);            noDefaultAndApplyButton();            setValid(false);        }        /* (non-Javadoc)         * @see net.sourceforge.eclipsetrader.core.ui.preferences.SecurityPropertiesDialog.FeedPage#createContents(org.eclipse.swt.widgets.Composite)         */        protected Control createContents(Composite parent)        {            Composite content = options.createControls(parent, security.getLevel2Feed());            GridLayout gridLayout = new GridLayout(2, false);            gridLayout.marginWidth = gridLayout.marginHeight = 0;            content.setLayout(gridLayout);                        setValid(true);                        return content;        }        /* (non-Javadoc)         * @see org.eclipse.jface.preference.PreferencePage#performOk()         */        public boolean performOk()        {            if (isValid())                security.setLevel2Feed(options.getFeed());            return super.performOk();        }    }        private class HistoryFeedPage extends PreferencePage    {        FeedOptions options = new FeedOptions("history"); //$NON-NLS-1$        public HistoryFeedPage()        {            super(Messages.SecurityPropertiesDialog_HistoryPage);            noDefaultAndApplyButton();            setValid(false);        }        /* (non-Javadoc)         * @see net.sourceforge.eclipsetrader.core.ui.preferences.SecurityPropertiesDialog.FeedPage#createContents(org.eclipse.swt.widgets.Composite)         */        protected Control createContents(Composite parent)        {            Composite content = options.createControls(parent, security.getHistoryFeed());            GridLayout gridLayout = new GridLayout(2, false);            gridLayout.marginWidth = gridLayout.marginHeight = 0;            content.setLayout(gridLayout);                        setValid(true);                        return content;        }        /* (non-Javadoc)         * @see org.eclipse.jface.preference.PreferencePage#performOk()         */        public boolean performOk()        {            if (isValid())                security.setHistoryFeed(options.getFeed());            return super.performOk();        }    }        private class TradeSourcePage extends PreferencePage    {        TradeSourceOptions options = new TradeSourceOptions(); //$NON-NLS-1$        public TradeSourcePage()        {            super(Messages.SecurityPropertiesDialog_TradeSourceTitle);            noDefaultAndApplyButton();            setValid(false);        }        /* (non-Javadoc)         * @see net.sourceforge.eclipsetrader.core.ui.preferences.SecurityPropertiesDialog.FeedPage#createContents(org.eclipse.swt.widgets.Composite)         */        protected Control createContents(Composite parent)        {            Composite content = options.createControls(parent, security.getTradeSource());            GridLayout gridLayout = new GridLayout(2, false);            gridLayout.marginWidth = gridLayout.marginHeight = 0;            content.setLayout(gridLayout);                        setValid(true);                        return content;        }        /* (non-Javadoc)         * @see org.eclipse.jface.preference.PreferencePage#performOk()         */        public boolean performOk()        {            if (isValid())                security.setTradeSource(options.getSource());            return super.performOk();        }    }    private class DataCollectorPage extends PreferencePage    {        IntradayDataOptions options = new IntradayDataOptions();        public DataCollectorPage()        {            super(Messages.SecurityPropertiesDialog_IntradayChartsPage);            noDefaultAndApplyButton();            setValid(false);        }        /* (non-Javadoc)         * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)         */        protected Control createContents(Composite parent)        {            Composite content = options.createControls(parent, security);            GridLayout gridLayout = new GridLayout(2, false);            gridLayout.marginWidth = gridLayout.marginHeight = 0;            content.setLayout(gridLayout);                        setValid(true);                        return content;        }        /* (non-Javadoc)         * @see org.eclipse.jface.preference.PreferencePage#performOk()         */        public boolean performOk()        {            if (isValid())                return options.saveSettings(security);            return super.performOk();        }    }    private class CommentsPage extends PreferencePage    {        private Text text;        public CommentsPage()        {            super("Notes");            noDefaultAndApplyButton();            setValid(false);        }        /* (non-Javadoc)         * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)         */        protected Control createContents(Composite parent)        {            Composite content = new Composite(parent, SWT.NONE);            GridLayout gridLayout = new GridLayout(1, false);            gridLayout.marginWidth = gridLayout.marginHeight = 0;            content.setLayout(gridLayout);            content.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));            text = new Text(content, SWT.BORDER|SWT.MULTI);            text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));            text.setText(security.getComment());                        setValid(true);            return content;        }        /* (non-Javadoc)         * @see org.eclipse.jface.preference.PreferencePage#performOk()         */        public boolean performOk()        {            if (isValid())                security.setComment(text.getText());            return super.performOk();        }    }}

⌨️ 快捷键说明

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