本文整理了Java中java.awt.Panel.getComponent()
方法的一些代码示例,展示了Panel.getComponent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Panel.getComponent()
方法的具体详情如下:
包路径:java.awt.Panel
类名称:Panel
方法名:getComponent
暂无
代码示例来源:origin: net.preibisch/multiview-reconstruction
@Override
public void textValueChanged(TextEvent e)
{
String path = ((TextField)pan.getComponent( 0 )).getText();
System.out.println(path);
if (path.endsWith( File.separator ))
path = path.substring( 0, path.length() - File.separator.length() );
if(new File(path).isDirectory())
path = String.join( File.separator, path, "*" );
lab.setText( previewFiles( getFilesFromPattern(path , Long.parseLong( num.getText() ) * KB_FACTOR)));
lab.setSize( lab.getPreferredSize() );
gdp.setSize( gdp.getPreferredSize() );
gdp.validate();
}
} );
代码示例来源:origin: net.preibisch/multiview-reconstruction
@Override
public void textValueChanged(TextEvent e)
{
String path = ((TextField)pan.getComponent( 0 )).getText();
if (path.endsWith( File.separator ))
path = path.substring( 0, path.length() - File.separator.length() );
if(new File(path).isDirectory())
path = String.join( File.separator, path, "*" );
lab.setText( previewFiles( getFilesFromPattern(path , Long.parseLong( num.getText() ) * KB_FACTOR)));
lab.setSize( lab.getPreferredSize() );
gdp.setSize( gdp.getPreferredSize() );
gdp.validate();
}
} );
代码示例来源:origin: net.preibisch/multiview-reconstruction
((TextField)pan.getComponent( 0 )).addTextListener( new TextListener()
代码示例来源:origin: sc.fiji/imagescience
private void progress() {
if (display()) {
final ImageJ ij = IJ.getInstance();
if (ij != null) { // To avoid exceptions in batch mode
String s = status();
final double min = min();
final double max = max();
final double p = min + percent*(max - min);
if (s == null || p >= 1) s = "";
IJ.showStatus(s);
IJ.showProgress(p);
if (enforce()) {
final Panel sb = ij.getStatusBar();
final JLabel sl = (JLabel)sb.getComponent(0);
sl.setOpaque(true); // Transparent by default
sl.paintImmediately(sl.getBounds());
final ProgressBar pb = (ProgressBar)sb.getComponent(1);
final Graphics pg = pb.getGraphics();
if (pg != null) pb.paint(pg);
}
}
}
}
代码示例来源:origin: mpicbg/mpicbg_
GUI( final ImagePlus imp )
{
window = imp.getWindow();
canvas = imp.getCanvas();
scrollBar = ( Scrollbar )( ( Panel )window.getComponent( 1 ) ).getComponent( 1 );
scrollBarValue = scrollBar.getValue();
scrollBarVisible = scrollBar.getVisibleAmount();
scrollBarMin = scrollBar.getMinimum();
scrollBarMax = scrollBar.getMaximum();
ij = IJ.getInstance();
}
代码示例来源:origin: axtimwalde/mpicbg
GUI( final ImagePlus imp )
{
window = imp.getWindow();
canvas = imp.getCanvas();
scrollBar = ( Scrollbar )( ( Panel )window.getComponent( 1 ) ).getComponent( 1 );
scrollBarValue = scrollBar.getValue();
scrollBarVisible = scrollBar.getVisibleAmount();
scrollBarMin = scrollBar.getMinimum();
scrollBarMax = scrollBar.getMaximum();
ij = IJ.getInstance();
}
代码示例来源:origin: ca.mcgill/Sholl_Analysis
try { // Access "units" label
final Panel p = (Panel) gd.getComponent(gd.getComponentCount() - 1);
final Label l = (Label) p.getComponent(1);
l.setForeground(EnhancedGenericDialog.getDisabledComponentColor());
} catch (final Exception ignored) {
内容来源于网络,如有侵权,请联系作者删除!