本文整理匯總了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();
}