public boolean isOpaque(SynthContext context) { if (context.getRegion() == Region.INTERNAL_FRAME) { return false; } else { return style.isOpaque(context); } }
/** * A convience method that will reset the Style of StyleContext if * necessary. * * @return newStyle */ public static SynthStyle updateSeaglassStyle(SynthContext context, SeaglassUI ui) { SynthStyle newStyle = getStyle(context.getComponent(), context.getRegion()); // TODO rossi 04.07.2011 this code is now private in the Synth L&F // SynthStyle oldStyle = context.getStyle(); // // if (newStyle != oldStyle) { // if (oldStyle != null) { // oldStyle.uninstallDefaults(context); // } // context.setStyle(newStyle); // newStyle.installDefaults(context, ui); // } return newStyle; }
/** * @param context * @param style * @return */ public static SynthContext getContext(SynthContext context, SynthStyle style) { if (context.getStyle().equals(style)) return context; return getContext(context.getComponent(), context.getRegion(), style, context.getComponentState()); } /**
/** * @param context * @param style * @return */ public static SynthContext getContext(SynthContext context, SynthStyle style) { if (context.getStyle().equals(style)) return context; return getContext(context.getComponent(), context.getRegion(), style, context.getComponentState()); } /**
/** * @param context * @param style * @return */ public static SynthContext getContext(SynthContext context, SynthStyle style) { if (context.getStyle().equals(style)) return context; return getContext(context.getComponent(), context.getRegion(), style, context.getComponentState()); } /**
/** * @param context * @param style * @return */ public static SynthContext getContext(SynthContext context, SynthStyle style) { if (context.getStyle().equals(style)) return context; return getContext(context.getComponent(), context.getRegion(), style, context.getComponentState()); } /**
/** * Returns a context with the given component state and all other fields same as input context. * * @param context the context, must not be null * @param state the component state. * @return a context with the given component state and other fields as inpu context. */ public static SynthContext getContext(SynthContext context, int state) { if (context.getComponentState() == state) return context; return getContext(context.getComponent(), context.getRegion(), context.getStyle(), state); }
/** * Returns a context with the given component state and all other fields same as input context. * * @param context the context, must not be null * @param state the component state. * @return a context with the given component state and other fields as inpu context. */ public static SynthContext getContext(SynthContext context, int state) { if (context.getComponentState() == state) return context; return getContext(context.getComponent(), context.getRegion(), context.getStyle(), state); }
/** * Returns a context with the given component state and all other fields same as input context. * * @param context the context, must not be null * @param state the component state. * @return a context with the given component state and other fields as inpu context. */ public static SynthContext getContext(SynthContext context, int state) { if (context.getComponentState() == state) return context; return getContext(context.getComponent(), context.getRegion(), context.getStyle(), state); }
/** * Returns a context with the given component state and all other fields same as input context. * * @param context the context, must not be null * @param state the component state. * @return a context with the given component state and other fields as inpu context. */ public static SynthContext getContext(SynthContext context, int state) { if (context.getComponentState() == state) return context; return getContext(context.getComponent(), context.getRegion(), context.getStyle(), state); }
boolean subregion = context.getRegion().isSubregion(); if ((subregion && style.isOpaque(context)) || (!subregion && c.isOpaque())) {
boolean subregion = context.getRegion().isSubregion(); if ((subregion && style.isOpaque(context)) || (!subregion && c.isOpaque())) {
boolean subregion = state.getRegion().isSubregion();
boolean subregion = context.getRegion().isSubregion(); if ((subregion && style.isOpaque(context)) || (!subregion && c.isOpaque())) {
boolean subregion = context.getRegion().isSubregion(); if ((subregion && style.isOpaque(context)) || (!subregion && c.isOpaque())) {
if (context.getRegion().isSubregion()){ insets = context.getStyle().getInsets(context, insets);
/** * A convenience method to return where the foreground should be painted for * the Component identified by the passed in AbstractSynthContext. * * @param state the SynthContext representing the current state. * @param insets an Insets object to be filled with the painting insets. * * @return the insets object passed in and filled with the painting insets. */ public static Insets getPaintingInsets(SynthContext state, Insets insets) { if (state.getRegion().isSubregion()) { insets = state.getStyle().getInsets(state, insets); } else { insets = state.getComponent().getInsets(insets); } return insets; }
Region id = context.getRegion(); int cs = context.getComponentState();