listing29.3.java

来自「java 完全探索的随书源码」· Java 代码 · 共 43 行

JAVA
43
字号
public synchronized String getOutputText() {
   return( OutputText );
}

public synchronized void setOutputText( String text ) {
   OutputText = text;
   // force a paint
   Graphics g = getGraphics();
   if ( g != null ) {
     update(g);
   }
}

public synchronized Color getBGColor() {
   return( BGColor );
}

public synchronized void setBGColor( Color color ) {
   BGColor = color;
   setBackground( BGColor );   // set the Canvas's background color.
   repaint();
}

public synchronized Font getTextFont() {
   return( TextFont );
}

public synchronized void setTextFont( Font font ) {
   TextFont = font;
   setFont( TextFont );        // set the Canvas's font.
}

public synchronized Color getFontColor() {
   return( FontColor );
}

public synchronized void setFontColor( Color color ) {
   FontColor = color;
   setForeground( FontColor ); // set the Canvas's foreground color.
   repaint();
}

⌨️ 快捷键说明

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