本文整理了Java中javax.swing.JTextPane.getScrollableTracksViewportWidth()
方法的一些代码示例,展示了JTextPane.getScrollableTracksViewportWidth()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextPane.getScrollableTracksViewportWidth()
方法的具体详情如下:
包路径:javax.swing.JTextPane
类名称:JTextPane
方法名:getScrollableTracksViewportWidth
暂无
代码示例来源:origin: groovy/groovy-core
public boolean getScrollableTracksViewportWidth() {
boolean bool = super.getScrollableTracksViewportWidth();
if (unwrapped) {
Component parent = this.getParent();
ComponentUI ui = this.getUI();
int uiWidth = ui.getPreferredSize(this).width;
bool = (parent == null) || (uiWidth < parent.getSize().width);
}
return bool;
}
代码示例来源:origin: org.codehaus.groovy/groovy-console
public boolean getScrollableTracksViewportWidth() {
boolean bool = super.getScrollableTracksViewportWidth();
if (unwrapped) {
Component parent = this.getParent();
ComponentUI ui = this.getUI();
int uiWidth = ui.getPreferredSize(this).width;
bool = (parent == null) || (uiWidth < parent.getSize().width);
}
return bool;
}
代码示例来源:origin: antlr/antlrworks
public boolean getScrollableTracksViewportWidth() {
if(!wrap) {
Component parent = getParent();
return parent == null || getUI().getPreferredSize(this).width < parent.getSize().width;
} else
return super.getScrollableTracksViewportWidth();
}
代码示例来源:origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm
public boolean getScrollableTracksViewportWidth() {
boolean bool = super.getScrollableTracksViewportWidth();
if (unwrapped) {
Component parent = this.getParent();
ComponentUI ui = this.getUI();
int uiWidth = ui.getPreferredSize(this).width;
bool = (parent == null) || (uiWidth < parent.getSize().width);
}
return bool;
}
代码示例来源:origin: org.kohsuke.droovy/groovy
public boolean getScrollableTracksViewportWidth(){
boolean bool = super.getScrollableTracksViewportWidth();
if (unwrapped) {
Component parent = this.getParent();
ComponentUI ui = this.getUI();
int uiWidth = ui.getPreferredSize(this).width;
int parentWidth = parent.getSize().width;
bool = (parent != null) ?
(ui.getPreferredSize(this).width < parent.getSize().width) : true;
}
return bool;
}
代码示例来源:origin: antlr/antlrworks
public boolean getScrollableTracksViewportWidth() {
if(!wrap)
{
Component parent = getParent();
return parent == null || getUI().getPreferredSize(this).width < parent.getSize().width;
} else
return super.getScrollableTracksViewportWidth();
}
代码示例来源:origin: org.codehaus.groovy/groovy-all-minimal
public boolean getScrollableTracksViewportWidth(){
boolean bool = super.getScrollableTracksViewportWidth();
if (unwrapped) {
Component parent = this.getParent();
ComponentUI ui = this.getUI();
int uiWidth = ui.getPreferredSize(this).width;
int parentWidth = parent.getSize().width;
bool = (parent != null) ?
(ui.getPreferredSize(this).width < parent.getSize().width) : true;
}
return bool;
}
代码示例来源:origin: org.codehaus.groovy/groovy-jdk14
public boolean getScrollableTracksViewportWidth(){
boolean bool = super.getScrollableTracksViewportWidth();
if (unwrapped) {
Component parent = this.getParent();
ComponentUI ui = this.getUI();
int uiWidth = ui.getPreferredSize(this).width;
int parentWidth = parent.getSize().width;
bool = (parent != null) ?
(ui.getPreferredSize(this).width < parent.getSize().width) : true;
}
return bool;
}
代码示例来源:origin: otros-systems/otroslogviewer
public boolean getScrollableTracksViewportWidth() {
if (fullWidth) {
Container parent = getParent();
if (parent instanceof JViewport) {
JViewport port = (JViewport) parent;
TextUI ui = getUI();
int w = port.getWidth();
final Dimension preferredSize = ui.getPreferredSize(this);
if (preferredSize.width <= w) {
return true;
}
}
return false;
} else {
return super.getScrollableTracksViewportWidth();
}
}
内容来源于网络,如有侵权,请联系作者删除!