本文整理汇总了Java中org.jdesktop.swingx.JXTaskPaneContainer类的典型用法代码示例。如果您正苦于以下问题:Java JXTaskPaneContainer类的具体用法?Java JXTaskPaneContainer怎么用?Java JXTaskPaneContainer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JXTaskPaneContainer类属于org.jdesktop.swingx包,在下文中一共展示了JXTaskPaneContainer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSelectorComponent
import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
private JComponent getSelectorComponent(List<Demo> demoSet) {
JXTaskPaneContainer container = new JXTaskPaneContainer() {
// Issue #1189-swingx: reasonable implementation of block increment
@Override
public int getScrollableBlockIncrement(Rectangle visibleRect,
int orientation, int direction) {
return SwingConstants.VERTICAL == orientation ? visibleRect.height :
visibleRect.width;
}
};
container.setLayout(new VerticalLayout(0));
container.setBorder(BorderFactory.createEmptyBorder());
for (Demo demo : demoSet) {
String category = demo.getCategory();
JXTaskPane taskPane = getTaskPane(category);
if (taskPane == null) {
taskPane = createTaskPane(demo);
addTaskPane(taskPane, category);
container.add(taskPane);
}
addDemo(taskPane, demo);
}
JScrollPane pane = new JScrollPane(container);
return pane;
}
示例2: SideActionsGroupsListPanel
import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
public SideActionsGroupsListPanel()
{
super();
contentPanel = new JXTaskPaneContainer();
contentPanel.setScrollableWidthHint(ScrollableSizeHint.FIT);
contentPanel.setOpaque(false);
final JScrollPane contentPaneScroll = new JScrollPane();
contentPaneScroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
contentPaneScroll.getViewport().add(contentPanel);
contentPaneScroll.setOpaque(false);
setLayout(new BorderLayout());
this.add(contentPaneScroll, BorderLayout.CENTER);
this.setOpaque(false);
refreshUI();
}
示例3: createAdvancedOptionsTaskPaneContainer
import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
private Component createAdvancedOptionsTaskPaneContainer(JPanel advancedPortsPane) {
JXTaskPaneContainer advancedOptionsTaskPaneContainer =
new JXTaskPaneContainer();
advancedOptionsTaskPaneContainer.setOpaque(false);
JXTaskPane advancedOptionsTaskPane = new JXTaskPane();
advancedOptionsTaskPane.setTitle(getAdvancedOptionsTitle());
advancedOptionsTaskPane.setCollapsed(true);
advancedOptionsTaskPane.addPropertyChangeListener("collapsed",
new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
_pack();
}
});
advancedOptionsTaskPane.add(advancedPortsPane, BorderLayout.CENTER);
advancedOptionsTaskPaneContainer.add(advancedOptionsTaskPane);
return advancedOptionsTaskPaneContainer;
}
示例4: addBasicDefaults
import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
@Override
protected void addBasicDefaults(LookAndFeelAddons addon, DefaultsList defaults) {
super.addBasicDefaults(addon, defaults);
defaults.add(JXTaskPaneContainer.uiClassID, "org.jdesktop.swingx.plaf.basic.BasicTaskPaneContainerUI");
defaults.add("TaskPaneContainer.background", UIManagerExt.getSafeColor("Desktop.background",
new ColorUIResource(Color.decode("#005C5C"))));
defaults.add("TaskPaneContainer.border", new BorderUIResource(BorderFactory.createEmptyBorder(10, 10, 0, 10)));
}
示例5: installUI
import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void installUI(JComponent c) {
super.installUI(c);
taskPane = (JXTaskPaneContainer)c;
installDefaults();
LayoutManager manager = taskPane.getLayout();
if (manager == null || manager instanceof UIResource) {
taskPane.setLayout(createDefaultLayout());
}
}
示例6: createButtonStack
import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
private JComponent createButtonStack(JComponent demoContainer) {
JComponent buttonStack = new JXTaskPaneContainer();
JXTaskPane taskPane = new JXTaskPane();
taskPane.setTitle("demo");
taskPane.add(createTextAction(demoContainer));
taskPane.add(createPageAction(demoContainer));
buttonStack.add(taskPane);
return buttonStack;
}
示例7: setupTaskPane
import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
public void setupTaskPane(JComponent... pTaskPane) {
taskContainer = new JXTaskPaneContainer();
for (JComponent aPTaskPane : pTaskPane) {
taskContainer.add(aPTaskPane);
}
menuPanel.remove(jXTaskPaneContainer1);
JScrollPane s = new JScrollPane(taskContainer);
s.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
menuPanel.add(s, BorderLayout.CENTER);
taskContainer.setBackground(getBackground());
}
示例8: initComponents
import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
/** 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() {
menuPanel = new org.jdesktop.swingx.JXCollapsiblePane();
jXTaskPaneContainer1 = new org.jdesktop.swingx.JXTaskPaneContainer();
centerPanel = new org.jdesktop.swingx.JXPanel();
menuCollapsePanel = new org.jdesktop.swingx.JXPanel();
setPreferredSize(new java.awt.Dimension(190, 100));
setLayout(new java.awt.BorderLayout());
menuPanel.setAnimated(false);
menuPanel.setDirection(org.jdesktop.swingx.JXCollapsiblePane.Direction.RIGHT);
menuPanel.setInheritAlpha(false);
jXTaskPaneContainer1.setBackground(new java.awt.Color(240, 240, 240));
jXTaskPaneContainer1.setMinimumSize(new java.awt.Dimension(170, 10));
jXTaskPaneContainer1.setPreferredSize(new java.awt.Dimension(170, 10));
menuPanel.add(jXTaskPaneContainer1, java.awt.BorderLayout.CENTER);
add(menuPanel, java.awt.BorderLayout.EAST);
centerPanel.setPreferredSize(new java.awt.Dimension(20, 20));
centerPanel.setLayout(new java.awt.BorderLayout());
menuCollapsePanel.setBackground(new java.awt.Color(204, 204, 204));
menuCollapsePanel.setPreferredSize(new java.awt.Dimension(20, 473));
menuCollapsePanel.setLayout(new java.awt.BorderLayout());
centerPanel.add(menuCollapsePanel, java.awt.BorderLayout.EAST);
add(centerPanel, java.awt.BorderLayout.CENTER);
}
示例9: installUI
import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
public void installUI(JComponent c) {
super.installUI(c);
taskPane = (JXTaskPaneContainer)c;
installDefaults();
LayoutManager manager = taskPane.getLayout();
if (manager == null || manager instanceof UIResource) {
taskPane.setLayout(createDefaultLayout());
}
}
示例10: initializeFirstStep
import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
/**
* Initializes the internal frame for the first step. Creates necessery
* components and sets them to frame.
*
*/
public void initializeFirstStep(){
firstStepOptionPanel = new JXTaskPaneContainer();
firstStepOptionPanel.add(this.createDelimSelectorPanel());
firstStepOptionPanel.add(this.createDecimalSeparatorPanel());
firstStepOptionPanel.setBackgroundPainter(new MattePainter(Color.white));
JScrollPane scroll = new JScrollPane(firstStepOptionPanel);
scroll.setBorder(BorderFactory.createEmptyBorder());
this.setContent(scroll);
}
示例11: initializeSecondStep
import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
/**
* Initializes the internal frame for the second step. Creates necesserly
* components and sets them to frame.
*
*/
public void initializeSecondStep(){
secondStepOptionPanel = new JXTaskPaneContainer();
// secondStepOptionPanel.add(this.getDataTypePanel());
secondStepOptionPanel.add(this.getChipCountPanel());
secondStepOptionPanel.add(this.createGuessTheRestPanel());
secondStepOptionPanel.add(this.createDataTrimmingPanel());
secondStepOptionPanel.setBackgroundPainter(new MattePainter(Color.white));
JScrollPane scroll = new JScrollPane(secondStepOptionPanel);
scroll.setBorder(BorderFactory.createEmptyBorder());
this.setContent(scroll);
}
示例12: ScriptMenu
import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
private ScriptMenu() {
taskPane = new JXTaskPaneContainer();
taskPane.applyComponentOrientation(getComponentOrientation());
}
示例13: getTaskPane
import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
public JXTaskPaneContainer getTaskPane() {
return taskPane;
}
示例14: addWindowsDefaults
import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected void addWindowsDefaults(LookAndFeelAddons addon, DefaultsList defaults) {
super.addWindowsDefaults(addon, defaults);
if (addon instanceof WindowsClassicLookAndFeelAddons) {
defaults.add("TaskPaneContainer.background", UIManagerExt.getSafeColor("List.background",
new ColorUIResource(Color.decode("#005C5C"))));
} else if (addon instanceof WindowsLookAndFeelAddons) {
String xpStyle = OS.getWindowsVisualStyle();
ColorUIResource background;
Color backgroundGradientStart;
Color backgroundGradientEnd;
if (WindowsLookAndFeelAddons.HOMESTEAD_VISUAL_STYLE
.equalsIgnoreCase(xpStyle)) {
background = new ColorUIResource(201, 215, 170);
backgroundGradientStart = new Color(204, 217, 173);
backgroundGradientEnd = new Color(165, 189, 132);
} else if (WindowsLookAndFeelAddons.SILVER_VISUAL_STYLE
.equalsIgnoreCase(xpStyle)) {
background = new ColorUIResource(192, 195, 209);
backgroundGradientStart = new Color(196, 200, 212);
backgroundGradientEnd = new Color(177, 179, 200);
} else {
if (OS.isWindowsVista()) {
final Toolkit toolkit = Toolkit.getDefaultToolkit();
background = new ColorUIResource((Color)toolkit.getDesktopProperty("win.3d.backgroundColor"));
backgroundGradientStart = (Color)toolkit.getDesktopProperty("win.frame.activeCaptionColor");
backgroundGradientEnd = (Color)toolkit.getDesktopProperty("win.frame.inactiveCaptionColor");
} else {
background = new ColorUIResource(117, 150, 227);
backgroundGradientStart = new ColorUIResource(123, 162, 231);
backgroundGradientEnd = new ColorUIResource(99, 117, 214);
}
}
defaults.add("TaskPaneContainer.backgroundPainter", new PainterUIResource<JXTaskPaneContainer>(
new MattePainter(new GradientPaint(
0f, 0f, backgroundGradientStart,
0f, 1f, backgroundGradientEnd),
true)));
defaults.add("TaskPaneContainer.background", background);
}
}
示例15: createTaskPaneDemo
import org.jdesktop.swingx.JXTaskPaneContainer; //导入依赖的package包/类
private void createTaskPaneDemo() {
JXTaskPaneContainer tpc = new JXTaskPaneContainer();
// "System" GROUP
systemGroup = new JXTaskPane();
systemGroup.setName("systemGroup");
tpc.add(systemGroup);
// "Office" GROUP
officeGroup = new JXTaskPane();
officeGroup.setName("officeGroup");
tpc.add(officeGroup);
// "SEE ALSO" GROUP and ACTIONS
seeAlsoGroup = new JXTaskPane();
seeAlsoGroup.setName("seeAlsoGroup");
tpc.add(seeAlsoGroup);
// "Details" GROUP
detailsGroup = new JXTaskPane();
detailsGroup.setName("detailsGroup");
//TODO better injection for editor area
JEditorPane area = new JEditorPane("text/html", "<html>");
area.setName("detailsArea");
area.setFont(UIManager.getFont("Label.font"));
Font defaultFont = UIManager.getFont("Button.font");
String stylesheet = "body { margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0; font-family: "
+ defaultFont.getName()
+ "; font-size: "
+ defaultFont.getSize()
+ "pt; }"
+ "a, p, li { margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0; font-family: "
+ defaultFont.getName()
+ "; font-size: "
+ defaultFont.getSize()
+ "pt; }";
if (area.getDocument() instanceof HTMLDocument) {
HTMLDocument doc = (HTMLDocument)area.getDocument();
try {
doc.getStyleSheet().loadRules(new java.io.StringReader(stylesheet),
null);
} catch (Exception e) {
// TODO: handle exception
}
}
detailsGroup.add(area);
tpc.add(detailsGroup);
add(new JScrollPane(tpc));
}