本文整理汇总了Java中org.jdesktop.swingx.JXTaskPane.add方法的典型用法代码示例。如果您正苦于以下问题:Java JXTaskPane.add方法的具体用法?Java JXTaskPane.add怎么用?Java JXTaskPane.add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jdesktop.swingx.JXTaskPane
的用法示例。
在下文中一共展示了JXTaskPane.add方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createAdvancedOptionsTaskPaneContainer
import org.jdesktop.swingx.JXTaskPane; //导入方法依赖的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;
}
示例2: createButtonStack
import org.jdesktop.swingx.JXTaskPane; //导入方法依赖的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;
}
示例3: addRenderedResult
import org.jdesktop.swingx.JXTaskPane; //导入方法依赖的package包/类
public void addRenderedResult(final JComponent component) {
final ImageIcon icon =
imageManager.getImageIcon(IconUtils.ACTION_DRILL_TO_DETAIL, IconUtils.ICON_SIZE_TASK_PANE);
final JXTaskPane taskPane = WidgetFactory.createTaskPane("Detailed results", icon);
final DCPanel taskPanePanel = new DCPanel(WidgetUtils.COLOR_DEFAULT_BACKGROUND);
taskPanePanel.setBorder(new EmptyBorder(4, 4, 4, 4));
taskPanePanel.setLayout(new BorderLayout());
taskPanePanel.add(component);
taskPane.add(taskPanePanel);
_taskPaneContainer.add(taskPane);
}
示例4: addTaskPane
import org.jdesktop.swingx.JXTaskPane; //导入方法依赖的package包/类
protected JXTaskPane addTaskPane(final Icon icon, final String title, final JComponent content,
final boolean expanded) {
final JXTaskPane taskPane = WidgetFactory.createTaskPane(title, icon);
taskPane.setCollapsed(!expanded);
taskPane.add(content);
_taskPaneContainer.add(taskPane);
return taskPane;
}
示例5: ProgressInformationPanel
import org.jdesktop.swingx.JXTaskPane; //导入方法依赖的package包/类
public ProgressInformationPanel(final boolean running) {
super(WidgetUtils.COLOR_DEFAULT_BACKGROUND);
setLayout(new BorderLayout());
_tableProgressInformationPanels = new ConcurrentHashMap<>();
_progressTimingCounters = new ConcurrentHashMap<>();
_stopWatch = Stopwatch.createUnstarted();
_executionLogTextArea = new JTextArea();
_executionLogTextArea.setText("--- DataCleaner progress information user-log ---");
_executionLogTextArea.setEditable(false);
_executionLogTextArea.setBackground(WidgetUtils.COLOR_DEFAULT_BACKGROUND);
_progressBarPanel = new DCPanel(WidgetUtils.COLOR_ALTERNATIVE_BACKGROUND);
_progressBarPanel.setLayout(new VerticalLayout(4));
final JXTaskPane progressTaskPane = WidgetFactory.createTaskPane("Progress", IconUtils.ACTION_EXECUTE);
progressTaskPane.add(_progressBarPanel);
final JXTitledPanel executionLogPanel =
WidgetFactory.createTitledPanel("Execution log", WidgetUtils.scrolleable(_executionLogTextArea));
executionLogPanel.setBorder(new MatteBorder(1, 1, 1, 1, WidgetUtils.COLOR_ALTERNATIVE_BACKGROUND));
final DCTaskPaneContainer taskPaneContainer = WidgetFactory.createTaskPaneContainer();
taskPaneContainer.setLayout(new BorderLayout(MARGIN, MARGIN));
if (running) {
taskPaneContainer.add(progressTaskPane, BorderLayout.NORTH);
}
setBorder(new MatteBorder(0, 0, MARGIN, 0, WidgetUtils.COLOR_DEFAULT_BACKGROUND));
taskPaneContainer.add(executionLogPanel, BorderLayout.CENTER);
add(taskPaneContainer, BorderLayout.CENTER);
}
示例6: createDecimalSeparatorPanel
import org.jdesktop.swingx.JXTaskPane; //导入方法依赖的package包/类
/**
* Creates panel for decimal separator selecting.
* This panel is used on the first step.
*
* @return panel for decimal separator selecting
*/
private JPanel createDecimalSeparatorPanel() {
JXTaskPane decimalSeparatorPanel = createTaskPane();
decimalSeparatorPanel.setLayout(new GridBagLayout());
ButtonGroup separatorGroup = new ButtonGroup();
dotAsDecimalSeparatorRadioButton = new JRadioButton("Dot .");
dotAsDecimalSeparatorRadioButton.setActionCommand(".");
dotAsDecimalSeparatorRadioButton.addActionListener(this);
dotAsDecimalSeparatorRadioButton.setOpaque(false);
separatorGroup.add(dotAsDecimalSeparatorRadioButton);
commaAsDecimalSeparatorRadioButton = new JRadioButton("Comma ,");
commaAsDecimalSeparatorRadioButton.setActionCommand(",");
commaAsDecimalSeparatorRadioButton.addActionListener(this);
commaAsDecimalSeparatorRadioButton.setOpaque(false);
separatorGroup.add(commaAsDecimalSeparatorRadioButton);
dotAsDecimalSeparatorRadioButton.setSelected(true);
screen.getConversionModel().setDecimalSeparator('.');
GridBagConstraints c = new GridBagConstraints();
c.gridx = 0; c.gridy = 0;
c.anchor = GridBagConstraints.WEST;
c.weightx = 1.0;
c.fill = GridBagConstraints.HORIZONTAL;
decimalSeparatorPanel.add(dotAsDecimalSeparatorRadioButton, c);
c.gridy++;
decimalSeparatorPanel.add(commaAsDecimalSeparatorRadioButton, c);
decimalSeparatorPanel.setTitle("Decimal Separator");
return decimalSeparatorPanel;
}
示例7: createGuessTheRestPanel
import org.jdesktop.swingx.JXTaskPane; //导入方法依赖的package包/类
private Component createGuessTheRestPanel() {
JXTaskPane guessTheRestPanel = createTaskPane();
guessTheRestPanel.setLayout(new BorderLayout());
fillTheRestButton = new JButton("Complete the rest");
guessTheRestPanel.add(fillTheRestButton, BorderLayout.WEST);
fillTheRestButton.addActionListener(this);
guessTheRestPanel.setTitle("Complete with pattern");
undoGuessButton = new JButton("Undo");
undoGuessButton.addActionListener(this);
undoGuessButton.setEnabled(false);
guessTheRestPanel.add(undoGuessButton, BorderLayout.EAST);
return guessTheRestPanel;
}
示例8: createTaskPaneDemo
import org.jdesktop.swingx.JXTaskPane; //导入方法依赖的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));
}
示例9: addDemo
import org.jdesktop.swingx.JXTaskPane; //导入方法依赖的package包/类
private void addDemo(JXTaskPane taskPane, Demo demo) {
taskPane.add(new DemoAction(demo));
}
示例10: createDelimSelectorPanel
import org.jdesktop.swingx.JXTaskPane; //导入方法依赖的package包/类
/**
* Creates panel for delimeter selection.
* This panel is used on the first step
*
* @return JPanel delimeter selection panel
*/
private JPanel createDelimSelectorPanel() {
JXTaskPane delimPanel = createTaskPane();
delimPanel.setLayout(new GridBagLayout());
delimRadioButtons = new ArrayList<JRadioButton>();
Map<String, JRadioButton>delimRadioButtonsByDelims = new HashMap<String, JRadioButton>();
ButtonGroup delimGroup = new ButtonGroup();
String[] selectorLabels = new String[Delimiter.values().length];
String[] delimiters = new String[Delimiter.values().length];
for(int i = 0; i < Delimiter.values().length; i++){
selectorLabels[i] = Delimiter.values()[i].getName();
delimiters[i] = Delimiter.values()[i].toString();
}
for (int i = 0; i < selectorLabels.length; i++) {
JRadioButton selector = new JRadioButton(selectorLabels[i]);
selector.setActionCommand(delimiters[i]);
selector.addActionListener(this);
selector.setOpaque(false);
delimGroup.add(selector);
delimRadioButtons.add(selector);
delimRadioButtonsByDelims.put(delimiters[i], selector);
}
customDelimRadioButton = new JRadioButton("Other:");
customDelimRadioButton.addActionListener(this);
customDelimRadioButton.setOpaque(false);
delimGroup.add(customDelimRadioButton);
delimRadioButtons.add(customDelimRadioButton);
delimRadioButtons.get(0).setSelected(true);
customDelimField = new JTextField(3);
customDelimField.addCaretListener(this);
//customDelimField.setPreferredSize(new Dimension(25, 20));
customDelimField.setMargin(new Insets(2, 2, 2, 2));
useCustomDelimButton = new JButton("Use");
useCustomDelimButton.addActionListener(this);
useCustomDelimButton.setEnabled(false);
GridBagConstraints c = new GridBagConstraints();
c.gridx = 0; c.gridy = 0;
c.gridwidth = 2;
c.anchor = GridBagConstraints.WEST;
c.weightx = 1.0;
c.fill = GridBagConstraints.HORIZONTAL;
for (int i = 0; i < delimRadioButtons.size()-1; i++) {
delimPanel.add(delimRadioButtons.get(i), c);
c.gridy++;
}
c.gridx = 0;
c.gridwidth = 1;
c.weightx = 0.0;
c.fill = GridBagConstraints.NONE;
delimPanel.add(customDelimRadioButton, c);
c.gridx = 1;
delimPanel.add(customDelimField, c);
c.gridx++;
delimPanel.add(useCustomDelimButton, c);
delimPanel.setTitle("Column Delimiter");
return delimPanel;
}