public void setDefaultFont( FontData fd ) { if ( fd != null ) { properties.setProperty( STRING_FONT_DEFAULT_NAME, fd.getName() ); properties.setProperty( STRING_FONT_DEFAULT_SIZE, "" + fd.getHeight() ); properties.setProperty( STRING_FONT_DEFAULT_STYLE, "" + fd.getStyle() ); } }
public void setGraphFont( FontData fd ) { properties.setProperty( STRING_FONT_GRAPH_NAME, fd.getName() ); properties.setProperty( STRING_FONT_GRAPH_SIZE, "" + fd.getHeight() ); properties.setProperty( STRING_FONT_GRAPH_STYLE, "" + fd.getStyle() ); }
public void setNoteFont( FontData fd ) { properties.setProperty( STRING_FONT_NOTE_NAME, fd.getName() ); properties.setProperty( STRING_FONT_NOTE_SIZE, "" + fd.getHeight() ); properties.setProperty( STRING_FONT_NOTE_STYLE, "" + fd.getStyle() ); }
public void setFixedFont( FontData fd ) { properties.setProperty( STRING_FONT_FIXED_NAME, fd.getName() ); properties.setProperty( STRING_FONT_FIXED_SIZE, "" + fd.getHeight() ); properties.setProperty( STRING_FONT_FIXED_STYLE, "" + fd.getStyle() ); }
public void setGridFont( FontData fd ) { properties.setProperty( STRING_FONT_GRID_NAME, fd.getName() ); properties.setProperty( STRING_FONT_GRID_SIZE, "" + fd.getHeight() ); properties.setProperty( STRING_FONT_GRID_STYLE, "" + fd.getStyle() ); }
public FontData getGridFont() { FontData def = getDefaultFontData(); String name = properties.getProperty( STRING_FONT_GRID_NAME, def.getName() ); String ssize = properties.getProperty( STRING_FONT_GRID_SIZE ); String sstyle = properties.getProperty( STRING_FONT_GRID_STYLE ); int size = Const.toInt( ssize, def.getHeight() ); int style = Const.toInt( sstyle, def.getStyle() ); return new FontData( name, size, style ); }
public FontData getGraphFont() { FontData def = getDefaultFontData(); String name = properties.getProperty( STRING_FONT_GRAPH_NAME, def.getName() ); int size = Const.toInt( properties.getProperty( STRING_FONT_GRAPH_SIZE ), def.getHeight() ); int style = Const.toInt( properties.getProperty( STRING_FONT_GRAPH_STYLE ), def.getStyle() ); return new FontData( name, size, style ); }
public FontData getNoteFont() { FontData def = getDefaultFontData(); String name = properties.getProperty( STRING_FONT_NOTE_NAME, def.getName() ); String ssize = properties.getProperty( STRING_FONT_NOTE_SIZE ); String sstyle = properties.getProperty( STRING_FONT_NOTE_STYLE ); int size = Const.toInt( ssize, def.getHeight() ); int style = Const.toInt( sstyle, def.getStyle() ); return new FontData( name, size, style ); }
public FontData getDefaultFont() { FontData def = getDefaultFontData(); if ( isOSLookShown() ) { return def; } String name = properties.getProperty( STRING_FONT_DEFAULT_NAME, def.getName() ); int size = Const.toInt( properties.getProperty( STRING_FONT_DEFAULT_SIZE ), def.getHeight() ); int style = Const.toInt( properties.getProperty( STRING_FONT_DEFAULT_STYLE ), def.getStyle() ); return new FontData( name, size, style ); }
/** * Returns a bold version of the given {@link Font}. * * @param baseFont * the {@link Font} for which a bold version is desired * @return the bold version of the given {@link Font} */ public static Font getBoldFont(Font baseFont) { Font font = m_fontToBoldFontMap.get(baseFont); if (font == null) { FontData fontDatas[] = baseFont.getFontData(); FontData data = fontDatas[0]; font = new Font(Display.getCurrent(), data.getName(), data.getHeight(), SWT.BOLD); m_fontToBoldFontMap.put(baseFont, font); } return font; } /**
properties.setProperty( STRING_FONT_FIXED_NAME, fd.getName() ); properties.setProperty( STRING_FONT_FIXED_SIZE, "" + fd.getHeight() ); properties.setProperty( STRING_FONT_FIXED_STYLE, "" + fd.getStyle() ); properties.setProperty( STRING_FONT_DEFAULT_NAME, fd.getName() ); properties.setProperty( STRING_FONT_DEFAULT_SIZE, "" + fd.getHeight() ); properties.setProperty( STRING_FONT_DEFAULT_STYLE, "" + fd.getStyle() ); properties.setProperty( STRING_FONT_GRAPH_NAME, fd.getName() ); properties.setProperty( STRING_FONT_GRAPH_SIZE, "" + fd.getHeight() ); properties.setProperty( STRING_FONT_GRAPH_STYLE, "" + fd.getStyle() ); properties.setProperty( STRING_FONT_GRID_NAME, fd.getName() ); properties.setProperty( STRING_FONT_GRID_SIZE, "" + fd.getHeight() ); properties.setProperty( STRING_FONT_GRID_STYLE, "" + fd.getStyle() ); properties.setProperty( STRING_FONT_NOTE_NAME, fd.getName() ); properties.setProperty( STRING_FONT_NOTE_SIZE, "" + fd.getHeight() ); properties.setProperty( STRING_FONT_NOTE_STYLE, "" + fd.getStyle() );
public void paintControl( PaintEvent pe ) { pe.gc.setFont( fixedFont ); Rectangle max = wFFont.getBounds(); String name = fixedFontData.getName() + " - " + fixedFontData.getHeight(); Point size = pe.gc.textExtent( name ); pe.gc.drawText( name, ( max.width - size.x ) / 2, ( max.height - size.y ) / 2, true ); } } );
public void paintControl( PaintEvent pe ) { pe.gc.setFont( graphFont ); Rectangle max = wGFont.getBounds(); String name = graphFontData.getName() + " - " + graphFontData.getHeight(); Point size = pe.gc.textExtent( name ); pe.gc.drawText( name, ( max.width - size.x ) / 2, ( max.height - size.y ) / 2, true ); } } );
public void paintControl( PaintEvent pe ) { pe.gc.setFont( noteFont ); Rectangle max = wNFont.getBounds(); String name = noteFontData.getName() + " - " + noteFontData.getHeight(); Point size = pe.gc.textExtent( name ); pe.gc.drawText( name, ( max.width - size.x ) / 2, ( max.height - size.y ) / 2, true ); } } );
new FontData( props.getGraphFont().getName(), (int) Math.round( props.getGraphFont().getHeight() * 1.2 ), props .getGraphFont().getStyle() ); fontMedium = new ManagedFont( display, mediumFontData ); new FontData( props.getGraphFont().getName(), (int) Math.round( props.getGraphFont().getHeight() * 1.2 ), props .getGraphFont().getStyle() | SWT.BOLD ); new FontData( props.getGraphFont().getName(), props.getGraphFont().getHeight() * 3, props.getGraphFont() .getStyle() ); fontLarge = new ManagedFont( display, largeFontData ); new FontData( props.getGraphFont().getName(), props.getGraphFont().getHeight() - 2, props.getGraphFont() .getStyle() ); fontTiny = new ManagedFont( display, tinyFontData ); new FontData( props.getGraphFont().getName(), props.getGraphFont().getHeight() - 1, props.getGraphFont() .getStyle() ); fontSmall = new ManagedFont( display, smallFontData ); new FontData( props.getDefaultFontData().getName(), props.getDefaultFontData().getHeight(), props .getDefaultFontData().getStyle() | SWT.BOLD );
public void widgetSelected( SelectionEvent arg0 ) { fixedFontData = new FontData( PropsUI.getInstance().getFixedFont().getName(), PropsUI.getInstance().getFixedFont().getHeight(), PropsUI.getInstance().getFixedFont().getStyle() ); fixedFont.dispose(); fixedFont = new Font( display, fixedFontData ); wFFont.redraw(); } } );
public void getData() { if ( notePadMeta != null ) { wDesc.setText( Const.NVL( notePadMeta.getNote(), "" ) ); wFontName.setText( notePadMeta.getFontName() == null ? props.getNoteFont().getName() : notePadMeta .getFontName() ); wFontSize.setSelection( notePadMeta.getFontSize() == -1 ? props.getNoteFont().getHeight() : notePadMeta wDrawShadow.setSelection( notePadMeta.isDrawShadow() ); } else { wFontName.setText( props.getNoteFont().getName() ); wFontSize.setSelection( props.getNoteFont().getHeight() ); wFontBold.setSelection( false );
PropsUI.getInstance().getLineWidth(), gridSize, PropsUI .getInstance().getShadowSize(), PropsUI.getInstance().isAntiAliasingEnabled(), PropsUI .getInstance().getNoteFont().getName(), PropsUI.getInstance().getNoteFont().getHeight() );
public Image getTransformationImage( Device device, int x, int y, float magnificationFactor ) { GCInterface gc = new SWTGC( device, new Point( x, y ), iconsize ); int gridSize = PropsUI.getInstance().isShowCanvasGridEnabled() ? PropsUI.getInstance().getCanvasGridSize() : 1; TransPainter transPainter = new TransPainter( gc, transMeta, new Point( x, y ), new SwtScrollBar( hori ), new SwtScrollBar( vert ), candidate, drop_candidate, selectionRegion, areaOwners, mouseOverSteps, PropsUI.getInstance().getIconSize(), PropsUI.getInstance().getLineWidth(), gridSize, PropsUI.getInstance().getShadowSize(), PropsUI.getInstance() .isAntiAliasingEnabled(), PropsUI.getInstance().getNoteFont().getName(), PropsUI.getInstance() .getNoteFont().getHeight(), trans, PropsUI.getInstance().isIndicateSlowTransStepsEnabled() ); transPainter.setMagnification( magnificationFactor ); transPainter.setStepLogMap( stepLogMap ); transPainter.setStartHopStep( startHopStep ); transPainter.setEndHopLocation( endHopLocation ); transPainter.setNoInputStep( noInputStep ); transPainter.setEndHopStep( endHopStep ); transPainter.setCandidateHopType( candidateHopType ); transPainter.setStartErrorHopStep( startErrorHopStep ); transPainter.setShowTargetStreamsStep( showTargetStreamsStep ); transPainter.buildTransformationImage(); Image img = (Image) gc.getImage(); gc.dispose(); return img; }
string += data.getName() + " " + data.getHeight() + " " + style + lf;