public Insets getInsets(SynthContext context, Insets insets) { return style.getInsets(context, insets); }
/** * {@inheritDoc} */ @Override public Insets getInsets(SynthContext ctx, Insets in) { return style.getInsets(ctx, in); }
/** * DOCUMENT ME! * * @param context DOCUMENT ME! * * @return DOCUMENT ME! */ protected TextFieldBorder createTextFieldBorder(SeaGlassContext context) { if (textFieldBorder == null) { textFieldBorder = new TextFieldBorder(this, context.getStyle().getInsets(context, null)); } return textFieldBorder; }
protected void recalculateIfInsetsChanged() { SeaGlassContext context = getContext(slider); Insets newInsets = style.getInsets(context, null); if (!newInsets.equals(insetCache)) { insetCache = newInsets; calculateGeometry(); } context.dispose(); }
/** * Installs a SynthBorder from the current style, if ui-installable. * * @param context the context */ protected void installSynthBorder() { if (SwingXUtilities.isUIInstallable(list.getBorder())) { list.setBorder(new SynthBorder(this, style.getInsets(getContext(ENABLED), null))); } }
/** * Installs a SynthBorder from the current style, if ui-installable. * * @param context the context */ protected void installSynthBorder() { if (SwingXUtilities.isUIInstallable(list.getBorder())) { list.setBorder(new SynthBorder(this, style.getInsets(getContext(ENABLED), null))); } }
/** * Installs a SynthBorder from the current style, if ui-installable. * * @param context the context */ protected void installSynthBorder() { if (SwingXUtilities.isUIInstallable(list.getBorder())) { list.setBorder(new SynthBorder(this, style.getInsets(getContext(ENABLED), null))); } }
/** * Installs a SynthBorder from the current style, if ui-installable. * * @param context the context */ protected void installSynthBorder() { if (SwingXUtilities.isUIInstallable(list.getBorder())) { list.setBorder(new SynthBorder(this, style.getInsets(getContext(ENABLED), null))); } }
/** * 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; }
style.getInsets(trackContext, trackInsets); trackContext.dispose(); if (slider.getOrientation() == JSlider.HORIZONTAL) {
return style.getInsets(context, insets);
protected void updateMargin(AbstractButton b) { String pp = getPropertyPrefix(); if (LookAndFeelFactory.isLnfInUse(LookAndFeelFactory.SYNTH_LNF)) { SynthStyle ss = SynthLookAndFeel.getStyle(b, Region.BUTTON); SynthContext sc = new SynthContext(b, Region.BUTTON, ss, 0); Insets insets = ss.getInsets(sc, new InsetsUIResource(0, 0, 0, 0)); if (insets != null) { b.setMargin(insets); } } else if (b.getMargin() == null || (b.getMargin() instanceof UIResource)) { if (shouldWrapText(b)) { b.setMargin(UIDefaultsLookup.getInsets(pp + "margin.vertical")); } else { b.setMargin(UIDefaultsLookup.getInsets(pp + "margin")); } } }
style.getInsets(trackContext, trackInsets); trackContext.dispose();