本文整理了Java中javax.swing.JEditorPane.getMinimumSize()
方法的一些代码示例,展示了JEditorPane.getMinimumSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JEditorPane.getMinimumSize()
方法的具体详情如下:
包路径:javax.swing.JEditorPane
类名称:JEditorPane
方法名:getMinimumSize
暂无
代码示例来源:origin: org.netbeans.modules/org-netbeans-lib-profiler-ui
public Dimension getMinimumSize() {
if (pendingText != null) {
forceSetText = true;
setText(pendingText);
}
return super.getMinimumSize();
}
代码示例来源:origin: com.eas.platypus/platypus-js-grid
@Override
public Dimension getMinimumSize() {
if (colGroup.isLeaf()) {
Dimension d = super.getMinimumSize();
View view = getUI().getRootView(this);
if (view != null) {
d.width = Math.round(view.getMinimumSpan(View.X_AXIS));
}
return new Dimension(Math.max(d.width, colGroup.getMinWidth()), d.height);
} else {
Dimension d = super.getPreferredSize();
return new Dimension(0, d.height);
}
}
代码示例来源:origin: igniterealtime/Spark
if ((scaleWidthToFit) && (JEditorPane.getMinimumSize().getWidth() >
pageFormat.getImageableWidth())) {
scale = pageFormat.getImageableWidth() /
JEditorPane.getMinimumSize().getWidth();
graphics2D.scale(scale, scale);
(int)(JEditorPane.getMinimumSize().getWidth()),
(int)(JEditorPane.getPreferredSize().getHeight()));
代码示例来源:origin: org.gephi/ui-components
@Override
public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) {
boolean last = false;
try {
View rootView = displayPane.getUI().getRootView(displayPane);
double scaleX = pageFormat.getImageableWidth() / displayPane.getMinimumSize().getWidth();
scaleX = Math.min(scaleX, 1.0);
double scaleY = scaleX;
int end = (int) (pageIndex * ((1.0f / scaleY) * (double) pageFormat.getImageableHeight()));
Rectangle allocation = new Rectangle(0,
-end,
(int) pageFormat.getImageableWidth(),
(int) pageFormat.getImageableHeight());
((Graphics2D) graphics).scale(scaleX, scaleY);
graphics.setClip((int) (pageFormat.getImageableX() / scaleX),
(int) (pageFormat.getImageableY() / scaleY),
(int) (pageFormat.getImageableWidth() / scaleX),
(int) (pageFormat.getImageableHeight() / scaleY));
((Graphics2D) graphics).translate(((Graphics2D) graphics).getClipBounds().getX(),
((Graphics2D) graphics).getClipBounds().getY());
rootView.paint(graphics, allocation);
last = end > displayPane.getUI().getPreferredSize(displayPane).getHeight();
if ((last)) {
return Printable.NO_SUCH_PAGE;
}
} catch (Exception e) {
Exceptions.printStackTrace(e);
}
return Printable.PAGE_EXISTS;
}
内容来源于网络,如有侵权,请联系作者删除!