本文整理了Java中javax.swing.JScrollPane.getColumnHeader()
方法的一些代码示例,展示了JScrollPane.getColumnHeader()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JScrollPane.getColumnHeader()
方法的具体详情如下:
包路径:javax.swing.JScrollPane
类名称:JScrollPane
方法名:getColumnHeader
暂无
代码示例来源:origin: jawi/ols
/**
* Returns the export image size for the given component.
*
* @param aDiagram
* the component to get the export image size for, cannot be
* <code>null</code>.
* @return a export image size, never <code>null</code>.
*/
private Dimension getImageSize( final JComponent aDiagram )
{
if ( aDiagram instanceof JScrollPane )
{
final JScrollPane scrollpane = ( JScrollPane )aDiagram;
final Dimension visibleViewSize = scrollpane.getViewport().getExtentSize();
final Dimension viewSize = scrollpane.getViewport().getViewSize();
final Dimension rowHeaderSize = scrollpane.getRowHeader().getExtentSize();
final Dimension columnHeaderSize = scrollpane.getColumnHeader().getExtentSize();
final int width = Math.min( viewSize.width, visibleViewSize.width ) + rowHeaderSize.width;
final int height = Math.min( viewSize.height, visibleViewSize.height ) + columnHeaderSize.height;
return new Dimension( width, height );
}
return aDiagram.getSize();
}
代码示例来源:origin: com.synaptix/SynaptixSwing
private void exportToImage() {
JScrollPane scrollPane = (JScrollPane) getParent().getParent();
Component cTop = scrollPane.getColumnHeader().getComponent(0);
Component cLeft = scrollPane.getRowHeader().getComponent(0);
Component cCenter = scrollPane.getViewport().getComponent(0);
代码示例来源:origin: stackoverflow.com
Rectangle bounds = getViewport().getVisibleRect();
g2.scale(bounds.getWidth(), -1);
int y = (getColumnHeader() == null) ? 0 : getColumnHeader().getHeight();
g2.drawImage(shadow, bounds.x, -bounds.y - y - h, null);
g2.scale(1, -1);
代码示例来源:origin: com.github.arnabk/pgslookandfeel
if(c instanceof JScrollPane) {
JScrollPane sc = (JScrollPane)c;
if(sc.getColumnHeader() != null) {
g.drawLine(0, 0, width-1, 0); // border top
代码示例来源:origin: com.eas.platypus/platypus-js-forms
/**
* This method is invoked after the ScrollPaneLayout is set as the
* LayoutManager of a <code>JScrollPane</code>.
* It initializes all of the internal fields that
* are ordinarily set by <code>addLayoutComponent</code>. For example:
* <pre>
* ScrollPaneLayout mySPLayout = new ScrollPanelLayout() {
* public void layoutContainer(Container p) {
* super.layoutContainer(p);
* // do some extra work here ...
* }
* };
* scrollpane.setLayout(mySPLayout):
* </pre>
*/
public void syncWithScrollPane(JScrollPane sp) {
viewport = sp.getViewport();
vsb = sp.getVerticalScrollBar();
hsb = sp.getHorizontalScrollBar();
rowHead = sp.getRowHeader();
colHead = sp.getColumnHeader();
lowerLeft = sp.getCorner(LOWER_LEFT_CORNER);
lowerRight = sp.getCorner(LOWER_RIGHT_CORNER);
upperLeft = sp.getCorner(UPPER_LEFT_CORNER);
upperRight = sp.getCorner(UPPER_RIGHT_CORNER);
vsbPolicy = sp.getVerticalScrollBarPolicy();
hsbPolicy = sp.getHorizontalScrollBarPolicy();
}
代码示例来源:origin: JetBrains/jediterm
JScrollPane pane = (JScrollPane) grand;
if (viewport == pane.getViewport() || viewport == pane.getColumnHeader()) {
JScrollBar vsb = pane.getVerticalScrollBar();
Alignment va = getAlignment(vsb);
代码示例来源:origin: org.java.net.substance/substance
JScrollBar vertical = scrollPane.getVerticalScrollBar();
JScrollBar horizontal = scrollPane.getHorizontalScrollBar();
JViewport columnHeader = scrollPane.getColumnHeader();
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
/**
* This method is invoked after the ScrollPaneLayout is set as the
* LayoutManager of a <code>JScrollPane</code>.
* It initializes all of the internal fields that
* are ordinarily set by <code>addLayoutComponent</code>. For example:
* <pre>
* ScrollPaneLayout mySPLayout = new ScrollPanelLayout() {
* public void layoutContainer(Container p) {
* super.layoutContainer(p);
* // do some extra work here ...
* }
* };
* scrollpane.setLayout(mySPLayout):
* </pre>
*/
public void syncWithScrollPane(JScrollPane sp) {
viewport = sp.getViewport();
vsb = sp.getVerticalScrollBar();
hsb = sp.getHorizontalScrollBar();
rowHead = sp.getRowHeader();
colHead = sp.getColumnHeader();
lowerLeft = sp.getCorner(LOWER_LEFT_CORNER);
lowerRight = sp.getCorner(LOWER_RIGHT_CORNER);
upperLeft = sp.getCorner(UPPER_LEFT_CORNER);
upperRight = sp.getCorner(UPPER_RIGHT_CORNER);
vsbPolicy = sp.getVerticalScrollBarPolicy();
hsbPolicy = sp.getHorizontalScrollBarPolicy();
}
代码示例来源:origin: sc.fiji/TrackMate_
for ( final Component c : scrollTable.getColumnHeader().getComponents() )
scrollTable.getColumnHeader().setOpaque( false );
scrollTable.setVisible( true );
validate();
代码示例来源:origin: com.github.insubstantial/substance
JScrollBar vertical = scrollPane.getVerticalScrollBar();
JScrollBar horizontal = scrollPane.getHorizontalScrollBar();
JViewport columnHeader = scrollPane.getColumnHeader();
代码示例来源:origin: fiji/TrackMate
for ( final Component c : scrollTable.getColumnHeader().getComponents() )
scrollTable.getColumnHeader().setOpaque( false );
scrollTable.setVisible( true );
validate();
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
JScrollBar hsb = scrollpane.getHorizontalScrollBar();
JViewport rowHead = scrollpane.getRowHeader();
JViewport colHead = scrollpane.getColumnHeader();
boolean ltr = scrollpane.getComponentOrientation().isLeftToRight();
代码示例来源:origin: khuxtable/seaglass
JScrollBar hsb = scrollpane.getHorizontalScrollBar();
JViewport rowHead = scrollpane.getRowHeader();
JViewport colHead = scrollpane.getColumnHeader();
boolean ltr = scrollpane.getComponentOrientation().isLeftToRight();
代码示例来源:origin: jawi/ols
/**
* Repaints this component, the timeline and channel labels.
*/
final void repaintAll()
{
this.signalView.repaint( 50L );
final JScrollPane scrollPane = getAncestorOfClass( JScrollPane.class, this );
if ( scrollPane != null )
{
TimeLineView timeline = ( TimeLineView )scrollPane.getColumnHeader().getView();
timeline.repaint( 50L );
ChannelLabelsView channelLabels = ( ChannelLabelsView )scrollPane.getRowHeader().getView();
channelLabels.repaint( 50L );
}
}
代码示例来源:origin: jawi/ols
/**
* Revalidates this component, the timeline and channel labels.
*/
final void revalidateAll()
{
revalidate();
final JScrollPane scrollPane = getAncestorOfClass( JScrollPane.class, this );
if ( scrollPane != null )
{
TimeLineView timeline = ( TimeLineView )scrollPane.getColumnHeader().getView();
timeline.revalidate();
ChannelLabelsView channelLabels = ( ChannelLabelsView )scrollPane.getRowHeader().getView();
channelLabels.revalidate();
}
}
代码示例来源:origin: JetBrains/jediterm
if (parent instanceof JScrollPane) {
JScrollPane pane = (JScrollPane)parent;
if (component == pane.getColumnHeader()) {
return TOP;
代码示例来源:origin: jawi/ols
JViewport timelineViewport = scrollPane.getColumnHeader();
Component view = viewport.getView();
代码示例来源:origin: com.github.insubstantial/substance
JViewport columnHeader = scrollpane.getColumnHeader();
代码示例来源:origin: org.java.net.substance/substance
JViewport columnHeader = scrollpane.getColumnHeader();
代码示例来源:origin: com.eas.platypus/platypus-js-forms
gridScroll.setCorner(JScrollPane.UPPER_RIGHT_CORNER, progressIndicator);
gridScroll.setColumnHeaderView(trPanel);
gridScroll.getColumnHeader().addChangeListener(new ColumnHeaderScroller(gridScroll.getColumnHeader(), gridScroll.getViewport()));
gridScroll.setRowHeaderView(blPanel);
gridScroll.getRowHeader().addChangeListener(new RowHeaderScroller(gridScroll.getRowHeader(), gridScroll.getViewport()));
gridScroll.setViewportView(brPanel);
gridScroll.getViewport().setOpaque(false);
gridScroll.getColumnHeader().setOpaque(false);
gridScroll.getRowHeader().setOpaque(false);
内容来源于网络,如有侵权,请联系作者删除!