本文整理了Java中javax.swing.JTable.getPreferredScrollableViewportSize()
方法的一些代码示例,展示了JTable.getPreferredScrollableViewportSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTable.getPreferredScrollableViewportSize()
方法的具体详情如下:
包路径:javax.swing.JTable
类名称:JTable
方法名:getPreferredScrollableViewportSize
暂无
代码示例来源:origin: libgdx/libgdx
@Override
public Dimension getPreferredScrollableViewportSize () {
Dimension dim = super.getPreferredScrollableViewportSize();
dim.height = getPreferredSize().height;
return dim;
}
};
代码示例来源:origin: libgdx/libgdx
@Override
public Dimension getPreferredScrollableViewportSize () {
Dimension dim = super.getPreferredScrollableViewportSize();
dim.height = getPreferredSize().height;
return dim;
}
};
代码示例来源:origin: libgdx/libgdx
@Override
public Dimension getPreferredScrollableViewportSize () {
Dimension dim = super.getPreferredScrollableViewportSize();
dim.height = getPreferredSize().height;
return dim;
}
};
代码示例来源:origin: libgdx/libgdx
@Override
public Dimension getPreferredScrollableViewportSize () {
Dimension dim = super.getPreferredScrollableViewportSize();
dim.height = getPreferredSize().height;
return dim;
}
};
代码示例来源:origin: libgdx/libgdx
@Override
public Dimension getPreferredScrollableViewportSize () {
Dimension dim = super.getPreferredScrollableViewportSize();
dim.height = getPreferredSize().height;
return dim;
}
};
代码示例来源:origin: libgdx/libgdx
@Override
public Dimension getPreferredScrollableViewportSize () {
Dimension dim = super.getPreferredScrollableViewportSize();
dim.height = getPreferredSize().height;
return dim;
}
};
代码示例来源:origin: Waikato/meka
public Dimension getPreferredScrollableViewportSize() {
return m_Table.getPreferredScrollableViewportSize();
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
public Dimension getPreferredScrollableViewportSize() {
return m_Table.getPreferredScrollableViewportSize();
}
代码示例来源:origin: com.badlogicgames.gdx/gdx-tools
@Override
public Dimension getPreferredScrollableViewportSize () {
Dimension dim = super.getPreferredScrollableViewportSize();
dim.height = getPreferredSize().height;
return dim;
}
};
代码示例来源:origin: stackoverflow.com
private static final int N_ROWS = 8;
private JTable table = new JTable();
...
Dimension d = new Dimension(
table.getPreferredScrollableViewportSize().width,
N_ROWS * table.getRowHeight());
table.setPreferredScrollableViewportSize(d);
add(new JScrollPane(table));
代码示例来源:origin: com.badlogicgames.gdx/gdx-tools
@Override
public Dimension getPreferredScrollableViewportSize () {
Dimension dim = super.getPreferredScrollableViewportSize();
dim.height = getPreferredSize().height;
return dim;
}
};
代码示例来源:origin: wuntee/BurpAuthzPlugin
@Override
public Dimension getPreferredScrollableViewportSize() {
Dimension dim = super.getPreferredScrollableViewportSize();
// here we return the pref height
dim.height = getPreferredSize().height-150;
return dim;
}
};
代码示例来源:origin: com.badlogicgames.gdx/gdx-tools
@Override
public Dimension getPreferredScrollableViewportSize () {
Dimension dim = super.getPreferredScrollableViewportSize();
dim.height = getPreferredSize().height;
return dim;
}
};
代码示例来源:origin: wuntee/BurpAuthzPlugin
@Override
public Dimension getPreferredScrollableViewportSize() {
Dimension dim = super.getPreferredScrollableViewportSize();
// here we return the pref height
dim.height = getPreferredSize().height-150;
return dim;
}
};
代码示例来源:origin: com.fifesoft.rtext/fife.common
@Override
public Dimension getPreferredScrollableViewportSize() {
// All rows are equal height for our table
int rowHeight = getRowHeight();
Dimension d = super.getPreferredScrollableViewportSize();
if (d==null) {
d = new Dimension(480, rowHeight*8);
}
else {
d.height = rowHeight * 8;
}
return d;
}
代码示例来源:origin: girtel/Net2Plan
/**
* Sets the number of visible rows in a table.
*
* @param table Table
* @param rows Number of rows to show
* @since 0.2.0
*/
public static void setVisibleRowCount(JTable table, int rows) {
int height = 0;
for (int row = 0; row < rows; row++)
height += table.getRowHeight(row);
table.setPreferredScrollableViewportSize(new Dimension(table.getPreferredScrollableViewportSize().width, height));
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-lib-profiler-ui
public void setVisibleRows(int rows) {
Dimension size = super.getPreferredScrollableViewportSize();
size.height = rows * getRowHeight();
setPreferredScrollableViewportSize(size);
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
public Dimension getPreferredScrollableViewportSize() {
Dimension pref = super.getPreferredScrollableViewportSize();
if ((this.getAutoResizeMode() != JTable.AUTO_RESIZE_OFF) && (getParent() != null)) {
Insets insets = getParent().getInsets();
Dimension size = getParent().getSize();
pref.height = size.height - insets.top - insets.bottom;
}
return pref;
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
public Dimension getPreferredScrollableViewportSize() {
Dimension pref = super.getPreferredScrollableViewportSize();
if (this.getAutoResizeMode() != JTable.AUTO_RESIZE_OFF &&
getParent() != null) {
Insets insets = getParent().getInsets();
Dimension size = getParent().getSize();
pref.height = size.height - insets.top - insets.bottom;
}
return pref;
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
public Dimension getPreferredScrollableViewportSize() {
Dimension pref = super.getPreferredScrollableViewportSize();
if (this.getAutoResizeMode() != JTable.AUTO_RESIZE_OFF &&
getParent() != null) {
Insets insets = getParent().getInsets();
Dimension size = getParent().getSize();
pref.height = size.height - insets.top - insets.bottom;
}
return pref;
}
内容来源于网络,如有侵权,请联系作者删除!