/** * Allow the user to change the background paint. */ private void attemptBackgroundPaintSelection() { Color c; c = JColorChooser.showDialog(this, localizationResources.getString( "Background_Color"), Color.blue); if (c != null) { this.backgroundPaintSample.setPaint(c); } }
/** * Handle a grid paint selection. */ private void attemptGridPaintSelection() { Color c; c = JColorChooser.showDialog(this, localizationResources.getString( "Grid_Color"), Color.blue); if (c != null) { this.gridPaintSample.setPaint(c); } }
/** * Allow the user to change the outline paint. We use JColorChooser, so * the user can only choose colors (a subset of all possible paints). */ private void attemptOutlinePaintSelection() { Color c; c = JColorChooser.showDialog(this, localizationResources.getString( "Outline_Color"), Color.blue); if (c != null) { this.outlinePaintSample.setPaint(c); } }
/** * Allows the user the opportunity to change the outline paint. */ private void attemptModifyLabelPaint() { Color c; c = JColorChooser.showDialog( this, localizationResources.getString("Label_Color"), Color.blue ); if (c != null) { this.labelPaintSample.setPaint(c); } }
/** * Allows the user the opportunity to select a new background paint. Uses * JColorChooser, so we are only allowing a subset of all Paint objects to * be selected (fix later). */ private void attemptModifyBackgroundPaint() { Color c; c = JColorChooser.showDialog(this, localizationResources.getString( "Background_Color"), Color.blue); if (c != null) { this.background.setPaint(c); } }
/** * Allow the user the opportunity to select a Paint object. For now, we * just use the standard color chooser - all colors are Paint objects, but * not all Paint objects are colors (later we can implement a more general * Paint chooser). */ public void attemptPaintSelection() { Paint p = this.titlePaint.getPaint(); Color defaultColor = (p instanceof Color ? (Color) p : Color.blue); Color c = JColorChooser.showDialog( this, localizationResources.getString("Title_Color"), defaultColor ); if (c != null) { this.titlePaint.setPaint(c); } }