public String getAsText() { if ( value == null ) { return ""; } final BorderStyle borderStyle = StrokeUtility.translateStrokeStyle( value ); final float width = value.getLineWidth(); return borderStyle + ", " + width; }
public static boolean hasBorderEdge( final StyleSheet style ) { final Stroke s = (Stroke) style.getStyleProperty( ElementStyleKeys.STROKE ); if ( s instanceof BasicStroke == false ) { return false; } final BorderStyle borderStyle = StrokeUtility.translateStrokeStyle( s ); if ( BorderStyle.NONE.equals( borderStyle ) ) { return false; } return true; }
public StrokeEditorComponent( final BasicStrokeEditor editor ) { this.editor = editor; samplePanel = new SamplePanel(); final BasicStroke vb = (BasicStroke) editor.getValue(); if ( vb != null ) { width = vb.getLineWidth(); borderStyle = StrokeUtility.translateStrokeStyle( vb ); } else { width = 0; borderStyle = BorderStyle.NONE; } initGUI(); }
public static BorderEdge produceBorderEdge( final StyleSheet style ) { final Stroke s = (Stroke) style.getStyleProperty( ElementStyleKeys.STROKE ); if ( s instanceof BasicStroke == false ) { return null; } final BasicStroke bs = (BasicStroke) s; final BorderStyle borderStyle = StrokeUtility.translateStrokeStyle( s ); if ( BorderStyle.NONE.equals( borderStyle ) ) { return null; } final Color c = (Color) style.getStyleProperty( ElementStyleKeys.PAINT ); return new BorderEdge( borderStyle, c, StrictGeomUtility.toInternalValue( bs.getLineWidth() ) ); }
final Stroke s = (Stroke) style.getStyleProperty( ElementStyleKeys.STROKE ); final float strokeWidth = StrokeUtility.getStrokeWidth( s ); final BorderStyle strokeType = StrokeUtility.translateStrokeStyle( s ); bandStyleAtts.setAttribute( BundleNamespaces.STYLE, "stroke-weight", getAbsoluteLengthFormat().format( strokeWidth ) );