> <snip>
> /piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/pswing/PSwing.java
>      /**
>       * The cutoff at which the Swing component is rendered greek
>       */
> -    private final double renderCutoff = 0.3;
> +    private static final double GREEK_SCALE_CUT_OFF = 0.3d;

Similar values in PText are called greekThreshold and
DEFAULT_GREEK_THRESHOLD.  PText also has get/setGreekThreshold.

>      private JComponent component = null;
>      private double minFontSize = Double.MAX_VALUE;
> -    private Stroke defaultStroke = new BasicStroke();
> +    private transient Stroke defaultStroke = new BasicStroke();
>      private Font defaultFont = new Font("Serif", Font.PLAIN, 12);

Should these defaults be static and final?


Strange that PSwing overrides protected void paint(PPaintContext) with
public void paint(PPaintContext).  I recommend refactoring to

public void paint(PPaintContext) --> protected void paint(PPaintContext)
public void paintAsGreek(Graphics2D) --> protected void
paintGreek(PPaintContext)
public void paint(Graphics2D) --> protected void paintComponent(PPaintContext)

Subclasses might want access to the entire paint context for
paintGreek and paintComponent, not just the graphics.  I wonder how
much work this change would be though. . .

   michael

--~--~---------~--~----~------------~-------~--~----~
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to