本文整理汇总了Java中com.l2fprod.common.swing.JTaskPane类的典型用法代码示例。如果您正苦于以下问题:Java JTaskPane类的具体用法?Java JTaskPane怎么用?Java JTaskPane使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JTaskPane类属于com.l2fprod.common.swing包,在下文中一共展示了JTaskPane类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: installUI
import com.l2fprod.common.swing.JTaskPane; //导入依赖的package包/类
public void installUI(JComponent c) {
super.installUI(c);
taskPane = (JTaskPane)c;
taskPane.setLayout(new PercentLayout(PercentLayout.VERTICAL, 14));
taskPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10));
taskPane.setOpaque(true);
if (taskPane.getBackground() == null
|| taskPane.getBackground() instanceof ColorUIResource) {
taskPane
.setBackground(UIManager.getColor("TaskPane.background"));
}
useGradient = UIManager.getBoolean("TaskPane.useGradient");
if (useGradient) {
gradientStart = UIManager
.getColor("TaskPane.backgroundGradientStart");
gradientEnd = UIManager
.getColor("TaskPane.backgroundGradientEnd");
}
}
示例2: installUI
import com.l2fprod.common.swing.JTaskPane; //导入依赖的package包/类
public void installUI(JComponent c) {
super.installUI(c);
taskPane = (JTaskPane) c;
taskPane.setLayout(new PercentLayout(PercentLayout.VERTICAL, 14));
taskPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10));
taskPane.setOpaque(true);
if (taskPane.getBackground() == null || taskPane.getBackground() instanceof ColorUIResource) {
taskPane.setBackground(UIManager.getColor("TaskPane.background"));
}
useGradient = UIManager.getBoolean("TaskPane.useGradient");
if (useGradient) {
gradientStart = UIManager.getColor("TaskPane.backgroundGradientStart");
gradientEnd = UIManager.getColor("TaskPane.backgroundGradientEnd");
}
}
示例3: addBasicDefaults
import com.l2fprod.common.swing.JTaskPane; //导入依赖的package包/类
protected void addBasicDefaults(LookAndFeelAddons addon, List defaults) {
super.addBasicDefaults(addon, defaults);
defaults.addAll(Arrays.asList(new Object[]{
JTaskPane.UI_CLASS_ID,
"com.l2fprod.common.swing.plaf.basic.BasicTaskPaneUI",
"TaskPane.useGradient",
Boolean.FALSE,
"TaskPane.background",
UIManager.getColor("Desktop.background")
}));
}
示例4: addBasicDefaults
import com.l2fprod.common.swing.JTaskPane; //导入依赖的package包/类
protected void addBasicDefaults(LookAndFeelAddons addon, List defaults) {
super.addBasicDefaults(addon, defaults);
defaults.addAll(Arrays.asList(new Object[]{JTaskPane.UI_CLASS_ID,
"com.l2fprod.common.swing.plaf.basic.BasicTaskPaneUI",
"TaskPane.useGradient",
Boolean.FALSE,
"TaskPane.background",
UIManager.getColor("Desktop.background")}));
}
示例5: sourceAdded
import com.l2fprod.common.swing.JTaskPane; //导入依赖的package包/类
/**
* {@inheritDoc}.
*/
// @Override
public void sourceAdded(final ITrafficMessageSource aSource) {
JTaskPaneGroup panel = new TrafficMessageSourcePanel(aSource);
JTaskPane messageSourcesList = getMessageSourcesList();
messageSourcesList.add(panel);
this.pack();
}
示例6: sourceRemoved
import com.l2fprod.common.swing.JTaskPane; //导入依赖的package包/类
/**
* {@inheritDoc}.
*/
// @Override
public void sourceRemoved(final ITrafficMessageSource aSource) {
JTaskPane messageSourcesList = getMessageSourcesList();
Component[] components = messageSourcesList.getComponents();
for (Component component : components) {
if (component instanceof TrafficMessageSourcePanel) {
TrafficMessageSourcePanel panel = (TrafficMessageSourcePanel) component;
if (panel.getSource() == aSource) {
messageSourcesList.remove(panel);
}
}
}
this.pack();
}
示例7: buildRootComponent
import com.l2fprod.common.swing.JTaskPane; //导入依赖的package包/类
protected JComponent buildRootComponent(AbstractCommand command)
{
JTaskPane pane = new JTaskPane();
pane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
pane.setOpaque(false);
return pane;
}
示例8: DemoPanel
import com.l2fprod.common.swing.JTaskPane; //导入依赖的package包/类
public DemoPanel() {
JTaskPane taskPane = new JTaskPane();
// "System" GROUP
JTaskPaneGroup systemGroup = new JTaskPaneGroup();
systemGroup.setTitle(RESOURCE.getString("Main.tasks.systemGroup"));
systemGroup.setToolTipText(RESOURCE
.getString("Main.tasks.systemGroup.tooltip"));
systemGroup.setSpecial(true);
systemGroup.setIcon(new ImageIcon(TaskPaneMain.class
.getResource("icons/tasks-email.png")));
systemGroup.add(makeAction(RESOURCE.getString("Main.tasks.email"), "",
"icons/tasks-email.png"));
systemGroup.add(makeAction(RESOURCE.getString("Main.tasks.delete"), "",
"icons/tasks-recycle.png"));
taskPane.add(systemGroup);
// "Office" GROUP
JTaskPaneGroup officeGroup = new JTaskPaneGroup();
officeGroup.setTitle(RESOURCE.getString("Main.tasks.office"));
officeGroup.add(makeAction(RESOURCE.getString("Main.tasks.word"), "",
"icons/tasks-writedoc.png"));
officeGroup.setExpanded(false);
officeGroup.setScrollOnExpand(true);
taskPane.add(officeGroup);
// "SEE ALSO" GROUP and ACTIONS
JTaskPaneGroup seeAlsoGroup = new JTaskPaneGroup();
seeAlsoGroup.setTitle(RESOURCE.getString("Main.tasks.seealso"));
seeAlsoGroup.add(makeAction("The Internet", RESOURCE
.getString("Main.tasks.internet.tooltip"), "icons/tasks-internet.png"));
seeAlsoGroup.add(makeAction(RESOURCE.getString("Main.tasks.help"),
RESOURCE.getString("Main.tasks.help.tooltip"),
"icons/tasks-question.png"));
taskPane.add(seeAlsoGroup);
// "Details" GROUP
JTaskPaneGroup detailsGroup = new JTaskPaneGroup();
detailsGroup.setTitle(RESOURCE.getString("Main.tasks.details"));
detailsGroup.setScrollOnExpand(true);
JEditorPane detailsText = new JEditorPane("text/html", "<html>");
LookAndFeelTweaks.makeMultilineLabel(detailsText);
LookAndFeelTweaks.htmlize(detailsText);
detailsText.setText(RESOURCE.getString("Main.tasks.details.message"));
detailsGroup.add(detailsText);
taskPane.add(detailsGroup);
JScrollPane scroll = new JScrollPane(taskPane);
scroll.setBorder(null);
setLayout(new BorderLayout());
add("Center", scroll);
setBorder(null);
}