本文整理了Java中javax.swing.JScrollPane.getLayout()
方法的一些代码示例,展示了JScrollPane.getLayout()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JScrollPane.getLayout()
方法的具体详情如下:
包路径:javax.swing.JScrollPane
类名称:JScrollPane
方法名:getLayout
暂无
代码示例来源:origin: javax.help/javahelp
public Dimension getMinimumSize(JComponent c) {
if (sp != null) {
return ((ScrollPaneLayout)sp.getLayout()).minimumLayoutSize(sp);
} else {
return new Dimension(100,100);
}
}
代码示例来源:origin: com.synaptix/SynaptixWidget
@Override
protected void installDefaults(JScrollPane scrollpane) {
ScrollPaneLayout oldLayout = (ScrollPaneLayout) scrollpane.getLayout();
super.installDefaults(scrollpane);
scrollpane.setLayout(new MyAdjustedLayout(oldLayout));
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-ui
private void installOnScrollPane(final JScrollPane aScrollPane) {
if (theScrollPane != null) {
uninstallFromScrollPane();
}
theScrollPane = aScrollPane;
theFormerLayoutManager = theScrollPane.getLayout();
theScrollPane.setLayout(new TweakedScrollPaneLayout());
// theScrollPane.addPropertyChangeListener(COMPONENT_ORIENTATION, theComponentOrientationListener);
theScrollPane.getViewport().addContainerListener(theViewPortViewListener);
setCornerInScrollPane(theButton);
final Component comp = theScrollPane.getViewport().getView();
theComponent = (comp instanceof JComponent) ? (JComponent) comp : null;
}
代码示例来源:origin: org.java.net.substance/substance
if (((Boolean) evt.getNewValue()).booleanValue()) {
ScrollPaneLayout currLayout = (ScrollPaneLayout) c
.getLayout();
if (!(currLayout instanceof AdjustedLayout)) {
c.setLayout(new AdjustedLayout((ScrollPaneLayout) c
.getLayout()));
代码示例来源:origin: com.github.insubstantial/substance
if ((Boolean) evt.getNewValue()) {
ScrollPaneLayout currLayout = (ScrollPaneLayout) c
.getLayout();
if (!(currLayout instanceof AdjustedLayout)) {
c.setLayout(new AdjustedLayout((ScrollPaneLayout) c
.getLayout()));
代码示例来源:origin: org.java.net.substance/substance
@Override
protected void installDefaults(final JScrollPane scrollpane) {
super.installDefaults(scrollpane);
if (SubstanceCoreUtilities.toDrawWatermark(scrollpane)
&& (SubstanceLookAndFeel.getCurrentSkin(scrollpane)
.getWatermark() != null)) {
scrollpane.setOpaque(false);
scrollpane.getViewport().setOpaque(false);
}
scrollpane.setLayout(new AdjustedLayout((ScrollPaneLayout) scrollpane
.getLayout()));
SwingUtilities.invokeLater(new Runnable() {
public void run() {
// System.out.println("Installing");
installTableHeaderCornerFiller(scrollpane);
}
});
}
代码示例来源:origin: com.github.insubstantial/substance
@Override
protected void installDefaults(final JScrollPane scrollpane) {
super.installDefaults(scrollpane);
if (SubstanceCoreUtilities.toDrawWatermark(scrollpane)
&& (SubstanceLookAndFeel.getCurrentSkin(scrollpane)
.getWatermark() != null)) {
scrollpane.setOpaque(false);
scrollpane.getViewport().setOpaque(false);
}
scrollpane.setLayout(new AdjustedLayout((ScrollPaneLayout) scrollpane
.getLayout()));
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
// System.out.println("Installing");
installTableHeaderCornerFiller(scrollpane);
}
});
}
代码示例来源:origin: com.github.insubstantial/substance
@Override
protected void uninstallDefaults(JScrollPane c) {
Component upperRight = c.getCorner(JScrollPane.UPPER_RIGHT_CORNER);
if (upperRight instanceof UIResource) {
c.setCorner(JScrollPane.UPPER_RIGHT_CORNER, null);
}
Component upperLeft = c.getCorner(JScrollPane.UPPER_LEFT_CORNER);
if (upperLeft instanceof UIResource) {
c.setCorner(JScrollPane.UPPER_LEFT_CORNER, null);
}
LayoutManager lm = scrollpane.getLayout();
if (lm instanceof AdjustedLayout) {
c.setLayout(((AdjustedLayout) lm).delegate);
}
super.uninstallDefaults(c);
}
代码示例来源:origin: org.java.net.substance/substance
@Override
protected void uninstallDefaults(JScrollPane c) {
Component upperRight = c.getCorner(JScrollPane.UPPER_RIGHT_CORNER);
if (upperRight instanceof UIResource) {
c.setCorner(JScrollPane.UPPER_RIGHT_CORNER, null);
}
Component upperLeft = c.getCorner(JScrollPane.UPPER_LEFT_CORNER);
if (upperLeft instanceof UIResource) {
c.setCorner(JScrollPane.UPPER_LEFT_CORNER, null);
}
LayoutManager lm = scrollpane.getLayout();
if (lm instanceof AdjustedLayout) {
c.setLayout(((AdjustedLayout) lm).delegate);
}
super.uninstallDefaults(c);
}
代码示例来源:origin: net.java.dev.laf-widget/laf-widget
void installOnScrollPane(JScrollPane aScrollPane) {
if (theScrollPane != null)
uninstallFromScrollPane();
theScrollPane = aScrollPane;
theFormerLayoutManager = theScrollPane.getLayout();
theScrollPane.setLayout(new TweakedScrollPaneLayout());
theScrollPane.firePropertyChange("layoutManager", false, true);
theScrollPane.addPropertyChangeListener(COMPONENT_ORIENTATION,
propertyChangeListener);
theScrollPane.getViewport().addContainerListener(
theViewPortViewListener);
theScrollPane.setCorner(JScrollPane.LOWER_TRAILING_CORNER, theButton);
Component comp = theScrollPane.getViewport().getView();
theComponent = (comp instanceof JComponent) ? (JComponent) comp : null;
this.theButton.setIcon(LafWidgetRepository.getRepository()
.getLafSupport().getSearchIcon(
UIManager.getInt("ScrollBar.width") - 3,
theScrollPane.getComponentOrientation()));
theScrollPane.doLayout();
}
代码示例来源:origin: com.github.insubstantial/substance
LayoutManager lm = jsp.getLayout();
ScrollPaneLayout scrollLm = null;
if (lm instanceof ScrollPaneLayout) {
代码示例来源:origin: org.java.net.substance/substance
LayoutManager lm = jsp.getLayout();
ScrollPaneLayout scrollLm = null;
if (lm instanceof ScrollPaneLayout) {
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
scroll.setCorner(ScrollPaneConstants.LOWER_LEADING_CORNER, null);
ScrollPaneLayout layout = (ScrollPaneLayout) scroll.getLayout();
JScrollBar horizontal = layout.getHorizontalScrollBar();
JScrollBar vertical = layout.getVerticalScrollBar();
内容来源于网络,如有侵权,请联系作者删除!