/** * Returns a SynthPainter from the context's style. Fall-back to default if * none available. * * @param context SynthContext containing the style, must not be null. * @return a SynthPainter from the context's style, or a default if null. */ public static SynthPainter getPainter(SynthContext context) { SynthPainter painter = context.getStyle().getPainter(context); return painter != null ? painter : NULL_PAINTER; }
/** * Returns a SynthPainter from the context's style. Fall-back to default if * none available. * * @param context SynthContext containing the style, must not be null. * @return a SynthPainter from the context's style, or a default if null. */ public static SynthPainter getPainter(SynthContext context) { SynthPainter painter = context.getStyle().getPainter(context); return painter != null ? painter : NULL_PAINTER; }
/** * Returns a SynthPainter from the context's style. Fall-back to default if * none available. * * @param context SynthContext containing the style, must not be null. * @return a SynthPainter from the context's style, or a default if null. */ public static SynthPainter getPainter(SynthContext context) { SynthPainter painter = context.getStyle().getPainter(context); return painter != null ? painter : NULL_PAINTER; }
/** * Returns a SynthPainter from the context's style. Fall-back to default if * none available. * * @param context SynthContext containing the style, must not be null. * @return a SynthPainter from the context's style, or a default if null. */ public static SynthPainter getPainter(SynthContext context) { SynthPainter painter = context.getStyle().getPainter(context); return painter != null ? painter : NULL_PAINTER; }
/** * Convenience method to get the Painter from the current SynthStyle. This * will NEVER return null. * * @return the painter for the style and context, otherwise the empty * painter. */ @SuppressWarnings("all") public SynthPainter getPainter() { SynthPainter painter = getStyle().getPainter(this); if (painter != null) { return painter; } return EMPTY_PAINTER; } }