⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stubtoolkit.java.jdk11

📁 java高级使用教程 全书一共分六章
💻 JDK11
📖 第 1 页 / 共 2 页
字号:
    public PrintJob getPrintJob( Frame frame, String jobtitle, Properties props )
	{
	throw new InternalError( "not implemented" );
	}
    public void beep()
	{
	( new Acme.SynthAudioClip( 440, 250 ) ).play();
	}
    public java.awt.datatransfer.Clipboard getSystemClipboard()
	{
	throw new InternalError( "not implemented" );
	}
    public java.awt.EventQueue getSystemEventQueueImpl()
	{
	throw new InternalError( "not implemented" );
	}

    }


class StubImage extends sun.awt.image.Image
    {

    /*
    // Construct an image from image data.
    public StubImage( byte[] imagedata, int imageoffset, int imagelength )
	{
	super( imagedata, imageoffset, imagelength );
	}
    */

    // Construct an image from an ImageProducer object.
    public StubImage( ImageProducer producer )
	{
	super( producer );
	}

    public Graphics getGraphics()
	{
	return new StubGraphics( this );
	}

    protected sun.awt.image.ImageRepresentation getImageRep( int w, int h )
	{
	return super.getImageRep( w, h );
	}

    }


class StubGraphics extends Graphics {

    private void imageCreate( ImageRepresentation ir )
	{
	// !!!
	throw new InternalError( "not implemented" );
	}

    public StubGraphics( Graphics g )
	{
	}

    public StubGraphics( Image image )
	{
	OffScreenImageSource osis = (OffScreenImageSource) image.getSource();
	imageCreate( osis.getImageRep() );
	}

    // Create a new Graphics Object based on this one.
    public Graphics create()
	{
	StubGraphics g = new StubGraphics( this );
	return g;
	}

    public void translate( int x, int y )
	{
	throw new InternalError( "not implemented" );
	}

    public void dispose()
	{
	// Nothing.
	}

    public Font getFont()
	{
	throw new InternalError( "not implemented" );
	}
    public void setFont( Font font )
	{
	throw new InternalError( "not implemented" );
	}
    public FontMetrics getFontMetrics( Font font )
	{
	throw new InternalError( "not implemented" );
	}
    public Color getColor()
	{
	throw new InternalError( "not implemented" );
	}
    public void setColor( Color c )
	{
	throw new InternalError( "not implemented" );
	}
    public void setPaintMode()
	{
	throw new InternalError( "not implemented" );
	}
    public void setXORMode( Color c )
	{
	throw new InternalError( "not implemented" );
	}

    public Rectangle getClipRect()
	{
	throw new InternalError( "not implemented" );
	}
    public Rectangle getClipBounds()
	{
	throw new InternalError( "not implemented" );
	}
    public void clipRect( int x, int y, int w, int h )
	{
	throw new InternalError( "not implemented" );
	}
    public void setClip( int x, int y, int w, int h )
	{
	throw new InternalError( "not implemented" );
	}
    public Shape getClip()
	{
	throw new InternalError( "not implemented" );
	}
    public void setClip( Shape clip )
	{
	throw new InternalError( "not implemented" );
	}
    public void drawLine( int x1, int y1, int x2, int y2 )
	{
	throw new InternalError( "not implemented" );
	}
    public void fillRect( int x, int y, int w, int h )
	{
	throw new InternalError( "not implemented" );
	}
    public void clearRect( int x, int y, int w, int h )
	{
	throw new InternalError( "not implemented" );
	}
    public void drawString( String str, int x, int y )
	{
	throw new InternalError( "not implemented" );
	}
    public void drawChars( char[] data, int offset, int length, int x, int y )
	{
	throw new InternalError( "not implemented" );
	}
    public void drawBytes( byte[] data, int offset, int length, int x, int y )
	{
	throw new InternalError( "not implemented" );
	}

    /**
     * Draws an image at x,y in nonblocking mode with a callback object.
     */
    public boolean drawImage( Image img, int x, int y, ImageObserver observer )
	{
	StubImage i = (StubImage) img;
	if ( i.hasError() )
	    {
	    if ( observer != null )
		observer.imageUpdate(
		    img, ImageObserver.ERROR|ImageObserver.ABORT,
		    -1, -1, -1, -1 );
	    return false;
	    }
	ImageRepresentation ir = i.getImageRep( -1, -1 );
	return ir.drawImage( this, x, y, null, observer );
	}

    /**
     * Draws an image scaled to x,y,w,h in nonblocking mode with a
     * callback object.
     */
    public boolean drawImage(
	Image img, int x, int y, int width, int height, ImageObserver observer )
	{
	if ( width == 0 || height == 0 )
	    return true;
	StubImage i = (StubImage) img;
	if ( i.hasError() )
	    {
	    if ( observer != null )
		observer.imageUpdate(
		    img, ImageObserver.ERROR|ImageObserver.ABORT,
		    -1, -1, -1, -1 );
	    return false;
	    }
	if ( width < 0 ) width = -1;
	if ( height < 0 ) height = -1;
	ImageRepresentation ir = i.getImageRep( width, height );
	return ir.drawImage( this, x, y, null, observer );
	}

    /**
     * Draws an image at x,y in nonblocking mode with a solid background
     * color and a callback object.
     */
    public boolean drawImage(
	Image img, int x, int y, Color bg, ImageObserver observer )
	{
	StubImage i = (StubImage) img;
	if ( i.hasError() )
	    {
	    if ( observer != null )
		observer.imageUpdate(
		    img, ImageObserver.ERROR|ImageObserver.ABORT,
		    -1, -1, -1, -1 );
	    return false;
	    }
	ImageRepresentation ir = i.getImageRep( -1, -1 );
	return ir.drawImage( this, x, y, bg, observer );
	}

    /**
     * Draws an image scaled to x,y,w,h in nonblocking mode with a
     * solid background color and a callback object.
     */
    public boolean drawImage(
	Image img, int x, int y, int width, int height, Color bg,
	ImageObserver observer )
	{
	if ( width == 0 || height == 0 )
	    return true;
	StubImage i = (StubImage) img;
	if ( i.hasError() )
	    {
	    if ( observer != null )
		observer.imageUpdate(
		    img, ImageObserver.ERROR|ImageObserver.ABORT,
		    -1, -1, -1, -1 );
	    return false;
	    }
	if ( width < 0 ) width = -1;
	if ( height < 0 ) height = -1;
	ImageRepresentation ir = i.getImageRep( width, height );
	return ir.drawImage( this, x, y, bg, observer );
	}

    public boolean drawImage(
        Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1,
        int sx2, int sy2, ImageObserver observer )
        {
        throw new InternalError( "not implemented" );
        }
 
    public boolean drawImage(
        Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1,
        int sx2, int sy2, Color bgcolor, ImageObserver observer)
        {
        throw new InternalError( "not implemented" );
        }
 
    public void copyArea( int x, int y, int w, int h, int dx, int dy )
	{
	throw new InternalError( "not implemented" );
	}
    public void drawRoundRect( int x, int y, int w, int h, int arcWidth, int arcHeight )
	{
	throw new InternalError( "not implemented" );
	}
    public void fillRoundRect( int x, int y, int w, int h, int arcWidth, int arcHeight )
	{
	throw new InternalError( "not implemented" );
	}
    public void drawPolygon( int[] xPoints, int[] yPoints, int nPoints )
	{
	throw new InternalError( "not implemented" );
	}
    public void fillPolygon( int[] xPoints, int[] yPoints, int nPoints )
	{
	throw new InternalError( "not implemented" );
	}
    public void drawOval( int x, int y, int w, int h )
	{
	throw new InternalError( "not implemented" );
	}
    public void fillOval( int x, int y, int w, int h )
	{
	throw new InternalError( "not implemented" );
	}
    public void drawArc( int x, int y, int w, int h, int startAngle, int endAngle )
	{
	throw new InternalError( "not implemented" );
	}
    public void fillArc( int x, int y, int w, int h, int startAngle, int endAngle )
	{
	throw new InternalError( "not implemented" );
	}
    public void drawPolyline( int[] xPoints, int[] yPoints, int nPoints )
	{
	throw new InternalError( "not implemented" );
	}

    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -