📄 autoexportpluginoption.java
字号:
package org.rapla.plugin.autoexport;
import java.awt.BorderLayout;
import java.util.Locale;
import javax.swing.JCheckBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.DefaultConfiguration;
import org.rapla.components.layout.TableLayout;
import org.rapla.framework.RaplaContext;
import org.rapla.framework.RaplaException;
import org.rapla.gui.DefaultPluginOption;
public class AutoExportPluginOption extends DefaultPluginOption
{
JCheckBox booleanField = new JCheckBox();
//
public AutoExportPluginOption( RaplaContext sm ) throws RaplaException
{
super( sm );
}
protected JPanel createPanel() throws RaplaException {
JPanel panel = super.createPanel();
JPanel content = new JPanel();
double[][] sizes = new double[][] {
{5,TableLayout.PREFERRED, 5,TableLayout.FILL,5}
,{TableLayout.PREFERRED,5,TableLayout.PREFERRED, 5, TableLayout.PREFERRED, 5, TableLayout.PREFERRED, 5, TableLayout.PREFERRED}
};
TableLayout tableLayout = new TableLayout(sizes);
content.setLayout(tableLayout);
content.add(new JLabel("Show list of exported calendars im HTML Menu"), "1,4");
content.add(booleanField,"3,4");
panel.add( content, BorderLayout.CENTER);
return panel;
}
protected void addChildren( DefaultConfiguration newConfig) {
newConfig.setAttribute( AutoExportPlugin.SHOW_CALENDAR_LIST_IN_HTML_MENU, booleanField.isSelected() );
}
protected void readConfig( Configuration config) {
booleanField.setSelected( config.getAttributeAsBoolean(AutoExportPlugin.SHOW_CALENDAR_LIST_IN_HTML_MENU, false));
}
public String getDescriptorClassName() {
return AutoExportPlugin.class.getName();
}
public String getName(Locale locale) {
return "HTML Export Plugin";
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -