本文整理汇总了Java中org.jdesktop.swingx.JXTaskPaneContainer.add方法的典型用法代码示例。如果您正苦于以下问题:Java JXTaskPaneContainer.add方法的具体用法?Java JXTaskPaneContainer.add怎么用?Java JXTaskPaneContainer.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jdesktop.swingx.JXTaskPaneContainer
的用法示例。
在下文中一共展示了JXTaskPaneContainer.add方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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;
}
示例3: 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());
}
示例4: 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);
}
示例5: 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);
}
示例6: 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));
}