本文整理汇总了Java中org.eclipse.swt.widgets.ScrollBar.isVisible方法的典型用法代码示例。如果您正苦于以下问题:Java ScrollBar.isVisible方法的具体用法?Java ScrollBar.isVisible怎么用?Java ScrollBar.isVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.widgets.ScrollBar
的用法示例。
在下文中一共展示了ScrollBar.isVisible方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: computeTrim
import org.eclipse.swt.widgets.ScrollBar; //导入方法依赖的package包/类
private int computeTrim(Rectangle area, Table table, int tableWidth) {
Point preferredSize= computeTableSize(table, area.width, area.height);
int trim;
if (tableWidth > 1) {
trim= tableWidth - table.getClientArea().width;
} else {
// initially, the table has no extend and no client area - use the border with
// plus some padding as educated guess
trim= 2 * table.getBorderWidth() + 1 ;
}
if (preferredSize.y > area.height) {
// Subtract the scrollbar width from the total column width
// if a vertical scrollbar will be required, but is not currently showing
// (in which case it is already subtracted above)
ScrollBar vBar= table.getVerticalBar();
if (!vBar.isVisible()) {
Point vBarSize= vBar.getSize();
trim += vBarSize.x;
}
}
return trim;
}
示例2: smartScroll
import org.eclipse.swt.widgets.ScrollBar; //导入方法依赖的package包/类
protected void smartScroll(boolean force) {
ScrollBar scrollbar = chatConsole.inputText.getVerticalBar();
if (scrollbar != null
&& scrollbar.isVisible()
&& getPreferences().getBoolean(
PreferenceKeys.CHAT_IS_SMART_SCROLL_ENABLED)) {
if (force) {
setAutoScrolling(true);
}
else if (scrollbar.getMaximum() == scrollbar.getSelection()
+ scrollbar.getThumb()) {
setAutoScrolling(true);
} else {
setAutoScrolling(false);
}
}
}
示例3: handleBodyResize
import org.eclipse.swt.widgets.ScrollBar; //导入方法依赖的package包/类
protected void handleBodyResize() {
int availableWidth = subForm.getSize().x;
final ScrollBar verticalScrollBar = subForm.getVerticalBar();
if (verticalScrollBar != null && verticalScrollBar.isVisible()) {
availableWidth -= verticalScrollBar.getSize().x;
}
final TeamExplorerResizeEventArg arg = new TeamExplorerResizeEventArg(availableWidth);
context.getEvents().notifyListener(TeamExplorerEvents.FORM_RESIZED, arg);
subForm.layout(true, true);
subForm.reflow(true);
}
示例4: computeMaximumWidthOfAllColumns
import org.eclipse.swt.widgets.ScrollBar; //导入方法依赖的package包/类
private int computeMaximumWidthOfAllColumns()
{
ScrollBar vBar = tree.getVerticalBar();
boolean scrollBarShown = vBar.isVisible();
return comp.getClientArea().width - tree.getBorderWidth() - tree.getColumnCount() * tree.getGridLineWidth()
- ((scrollBarShown) ? vBar.getSize().x : 0);
}
示例5: updateColumnWidth
import org.eclipse.swt.widgets.ScrollBar; //导入方法依赖的package包/类
public void updateColumnWidth()
{
int hw = getSize().x;
ScrollBar sb = getVerticalBar();
if ( sb != null && sb.isVisible() )
hw -= sb.getSize().x;
hw /= 2;
hw -= getBorderWidth();
colStat.setWidth( hw );
colValue.setWidth( hw );
layout();
}