本文整理汇总了Java中org.jdesktop.swingx.decorator.ComponentAdapter.getComponent方法的典型用法代码示例。如果您正苦于以下问题:Java ComponentAdapter.getComponent方法的具体用法?Java ComponentAdapter.getComponent怎么用?Java ComponentAdapter.getComponent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jdesktop.swingx.decorator.ComponentAdapter
的用法示例。
在下文中一共展示了ComponentAdapter.getComponent方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getColumnLocation
import org.jdesktop.swingx.decorator.ComponentAdapter; //导入方法依赖的package包/类
private int getColumnLocation(ComponentAdapter adapter, int visualColumn) {
if (!(adapter.getComponent() instanceof JXTable)) {
return 0;
}
JXTable table = (JXTable) adapter.getComponent();
// PENDING JW: guard against null header
return table.getTableHeader().getHeaderRect(visualColumn).x;
}
示例2: getColumnWidth
import org.jdesktop.swingx.decorator.ComponentAdapter; //导入方法依赖的package包/类
private int getColumnWidth(ComponentAdapter adapter, int visualColumn) {
if (!(adapter.getComponent() instanceof JXTable)) {
return adapter.getComponent().getWidth();
}
JXTable table = (JXTable) adapter.getComponent();
return table.getColumn(visualColumn).getWidth();
}
示例3: getColumnAt
import org.jdesktop.swingx.decorator.ComponentAdapter; //导入方法依赖的package包/类
private int getColumnAt(ComponentAdapter adapter, int pixelLocation) {
if (!(adapter.getComponent() instanceof JXTable)) {
return 0;
}
JXTable table = (JXTable) adapter.getComponent();
// PENDING JW: guard against null header
return table.getTableHeader().columnAtPoint(new Point(pixelLocation, 10));
}
示例4: getCellBounds
import org.jdesktop.swingx.decorator.ComponentAdapter; //导入方法依赖的package包/类
private Rectangle getCellBounds(ComponentAdapter adapter) {
// PENDING JW: add method to adapter
JXTable table = (JXTable) adapter.getComponent();
Rectangle cellRect = table.getCellRect(adapter.row,
adapter.column, false);
return cellRect;
}
示例5: getColumnAt
import org.jdesktop.swingx.decorator.ComponentAdapter; //导入方法依赖的package包/类
private int getColumnAt(ComponentAdapter adapter, int pixelLocation) {
if (!(adapter.getComponent() instanceof JXTable)) {
return 0;
}
JXTable table = (JXTable) adapter.getComponent();
// PENDING JW: guard against null header
return table.getTableHeader().columnAtPoint(
new Point(pixelLocation, 10));
}
示例6: getColumnLocation
import org.jdesktop.swingx.decorator.ComponentAdapter; //导入方法依赖的package包/类
private int getColumnLocation(ComponentAdapter adapter, int visualColumn) {
if (!(adapter.getComponent() instanceof JXTable)) {
return 0;
}
JXTable table = (JXTable) adapter.getComponent();
// PENDING JW: guard against null header
return table.getTableHeader().getHeaderRect(visualColumn).x;
}
示例7: getColumnWidth
import org.jdesktop.swingx.decorator.ComponentAdapter; //导入方法依赖的package包/类
private int getColumnWidth(ComponentAdapter adapter, int visualColumn) {
if (!(adapter.getComponent() instanceof JXTable)) {
return adapter.getComponent().getWidth();
}
JXTable table = (JXTable) adapter.getComponent();
return table.getColumn(visualColumn).getWidth();
}
示例8: getColumnAt
import org.jdesktop.swingx.decorator.ComponentAdapter; //导入方法依赖的package包/类
private int getColumnAt(ComponentAdapter adapter, int pixelLocation) {
if (!(adapter.getComponent() instanceof JXTable)) {
return 0;
}
JXTable table = (JXTable) adapter.getComponent();
// PENDING JW: guard against null header
return table.getTableHeader().columnAtPoint(
new Point(pixelLocation, 10));
}
示例9: canHighlight
import org.jdesktop.swingx.decorator.ComponentAdapter; //导入方法依赖的package包/类
@Override
protected boolean canHighlight(Component component,
ComponentAdapter adapter) {
return super.canHighlight(component, adapter)
&& (adapter.getComponent() instanceof JTable);
}