本文整理汇总了Java中org.jdesktop.swingx.JXHeader.remove方法的典型用法代码示例。如果您正苦于以下问题:Java JXHeader.remove方法的具体用法?Java JXHeader.remove怎么用?Java JXHeader.remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jdesktop.swingx.JXHeader
的用法示例。
在下文中一共展示了JXHeader.remove方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: uninstallComponents
import org.jdesktop.swingx.JXHeader; //导入方法依赖的package包/类
/**
* Unconfigures, removes and nulls contained components.
*
* @param header the header to install the components into.
*/
protected void uninstallComponents(JXHeader header) {
uninstallComponentDefaults(header);
header.remove(titleLabel);
header.remove(descriptionPane);
header.remove(imagePanel);
titleLabel = null;
descriptionPane = null;
imagePanel = null;
}
示例2: resetLayout
import org.jdesktop.swingx.JXHeader; //导入方法依赖的package包/类
private void resetLayout(JXHeader h) {
h.remove(titleLabel);
h.remove(descriptionPane);
h.remove(imagePanel);
if (h.getIconPosition() == null || h.getIconPosition() == IconPosition.RIGHT) {
h.add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(12, 12, 0, 11), 0, 0));
h.add(descriptionPane, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.FIRST_LINE_START, GridBagConstraints.BOTH, new Insets(0, 24, 12, 11), 0, 0));
h.add(imagePanel, new GridBagConstraints(1, 0, 1, 2, 0.0, 1.0, GridBagConstraints.FIRST_LINE_END, GridBagConstraints.NONE, new Insets(12, 0, 11, 11), 0, 0));
} else {
h.add(titleLabel, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(12, 12, 0, 11), 0, 0));
h.add(descriptionPane, new GridBagConstraints(1, 1, 1, 1, 1.0, 1.0, GridBagConstraints.FIRST_LINE_START, GridBagConstraints.BOTH, new Insets(0, 24, 12, 11), 0, 0));
h.add(imagePanel, new GridBagConstraints(0, 0, 1, 2, 0.0, 1.0, GridBagConstraints.FIRST_LINE_END, GridBagConstraints.NONE, new Insets(12, 11, 0, 11), 0, 0));
}
}