Example usage for org.eclipse.jface.resource StringConverter asFontData

List of usage examples for org.eclipse.jface.resource StringConverter asFontData

Introduction

In this page you can find the example usage for org.eclipse.jface.resource StringConverter asFontData.

Prototype

public static FontData asFontData(String value) throws DataFormatException 

Source Link

Document

Converts the given value into an SWT font data object.

Usage

From source file:com.bluexml.side.Class.modeler.diagram.preferences.CdDiagramTopcasedPreferenceInitializer.java

License:Open Source License

/** 
 * @see org.topcased.modeler.preferences.ITopcasedPreferenceInitializer#getDefaultPreference()
 *   @generated//from w w  w . ja v a 2 s . c o  m
 */
public HashMap<String, String> getDefaultPreference() {
    HashMap<String, String> defaultCdPreference = new HashMap<String, String>();
    // Initialize the default value of the STEREOTYPE_DEFAULT_BACKGROUND_COLOR property 
    defaultCdPreference.put(CdDiagramPreferenceConstants.STEREOTYPE_DEFAULT_BACKGROUND_COLOR, "191,249,217");

    // Initialize the default value of the STEREOTYPE_DEFAULT_FOREGROUND_COLOR property
    defaultCdPreference.put(CdDiagramPreferenceConstants.STEREOTYPE_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the STEREOTYPE_DEFAULT_FONT property
    defaultCdPreference.put(CdDiagramPreferenceConstants.STEREOTYPE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the CLAZZ_DEFAULT_BACKGROUND_COLOR property 
    defaultCdPreference.put(CdDiagramPreferenceConstants.CLAZZ_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the CLAZZ_DEFAULT_FOREGROUND_COLOR property
    defaultCdPreference.put(CdDiagramPreferenceConstants.CLAZZ_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the CLAZZ_DEFAULT_FONT property
    defaultCdPreference.put(CdDiagramPreferenceConstants.CLAZZ_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the ASPECT_DEFAULT_BACKGROUND_COLOR property 
    defaultCdPreference.put(CdDiagramPreferenceConstants.ASPECT_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the ASPECT_DEFAULT_FOREGROUND_COLOR property
    defaultCdPreference.put(CdDiagramPreferenceConstants.ASPECT_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the ASPECT_DEFAULT_FONT property
    defaultCdPreference.put(CdDiagramPreferenceConstants.ASPECT_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the ATTRIBUTE_DEFAULT_BACKGROUND_COLOR property 
    defaultCdPreference.put(CdDiagramPreferenceConstants.ATTRIBUTE_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the ATTRIBUTE_DEFAULT_FOREGROUND_COLOR property
    defaultCdPreference.put(CdDiagramPreferenceConstants.ATTRIBUTE_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the ATTRIBUTE_DEFAULT_FONT property
    defaultCdPreference.put(CdDiagramPreferenceConstants.ATTRIBUTE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the OPERATION_DEFAULT_BACKGROUND_COLOR property 
    defaultCdPreference.put(CdDiagramPreferenceConstants.OPERATION_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the OPERATION_DEFAULT_FOREGROUND_COLOR property
    defaultCdPreference.put(CdDiagramPreferenceConstants.OPERATION_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the OPERATION_DEFAULT_FONT property
    defaultCdPreference.put(CdDiagramPreferenceConstants.OPERATION_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the CLASSCOMMENT_DEFAULT_BACKGROUND_COLOR property 
    defaultCdPreference.put(CdDiagramPreferenceConstants.CLASSCOMMENT_DEFAULT_BACKGROUND_COLOR, "191,249,217");

    // Initialize the default value of the CLASSCOMMENT_DEFAULT_FOREGROUND_COLOR property
    defaultCdPreference.put(CdDiagramPreferenceConstants.CLASSCOMMENT_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the CLASSCOMMENT_DEFAULT_FONT property
    defaultCdPreference.put(CdDiagramPreferenceConstants.CLASSCOMMENT_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the ENUMERATION_DEFAULT_BACKGROUND_COLOR property 
    defaultCdPreference.put(CdDiagramPreferenceConstants.ENUMERATION_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the ENUMERATION_DEFAULT_FOREGROUND_COLOR property
    defaultCdPreference.put(CdDiagramPreferenceConstants.ENUMERATION_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the ENUMERATION_DEFAULT_FONT property
    defaultCdPreference.put(CdDiagramPreferenceConstants.ENUMERATION_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the ENUMERATIONLITERAL_DEFAULT_BACKGROUND_COLOR property 
    defaultCdPreference.put(CdDiagramPreferenceConstants.ENUMERATIONLITERAL_DEFAULT_BACKGROUND_COLOR,
            "255,255,255");

    // Initialize the default value of the ENUMERATIONLITERAL_DEFAULT_FOREGROUND_COLOR property
    defaultCdPreference.put(CdDiagramPreferenceConstants.ENUMERATIONLITERAL_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the ENUMERATIONLITERAL_DEFAULT_FONT property
    defaultCdPreference.put(CdDiagramPreferenceConstants.ENUMERATIONLITERAL_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the VIEW_DEFAULT_BACKGROUND_COLOR property 
    defaultCdPreference.put(CdDiagramPreferenceConstants.VIEW_DEFAULT_BACKGROUND_COLOR, "218,248,239");

    // Initialize the default value of the VIEW_DEFAULT_FOREGROUND_COLOR property
    defaultCdPreference.put(CdDiagramPreferenceConstants.VIEW_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the VIEW_DEFAULT_FONT property
    defaultCdPreference.put(CdDiagramPreferenceConstants.VIEW_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the ASSOCIATION_EDGE_DEFAULT_FONT property
    defaultCdPreference.put(CdDiagramPreferenceConstants.ASSOCIATION_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the ASSOCIATION_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultCdPreference.put(CdDiagramPreferenceConstants.ASSOCIATION_EDGE_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the ASSOCIATION_EDGE_DEFAULT_ROUTER property
    defaultCdPreference.put(CdDiagramPreferenceConstants.ASSOCIATION_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the ISCOMMENTED_EDGE_DEFAULT_FONT property
    defaultCdPreference.put(CdDiagramPreferenceConstants.ISCOMMENTED_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the ISCOMMENTED_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultCdPreference.put(CdDiagramPreferenceConstants.ISCOMMENTED_EDGE_DEFAULT_FOREGROUND_COLOR,
            "128,128,192");

    // Initialize the default value of the ISCOMMENTED_EDGE_DEFAULT_ROUTER property
    defaultCdPreference.put(CdDiagramPreferenceConstants.ISCOMMENTED_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the ISSTEREOTYPED_EDGE_DEFAULT_FONT property
    defaultCdPreference.put(CdDiagramPreferenceConstants.ISSTEREOTYPED_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the ISSTEREOTYPED_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultCdPreference.put(CdDiagramPreferenceConstants.ISSTEREOTYPED_EDGE_DEFAULT_FOREGROUND_COLOR,
            "214,214,214");

    // Initialize the default value of the ISSTEREOTYPED_EDGE_DEFAULT_ROUTER property
    defaultCdPreference.put(CdDiagramPreferenceConstants.ISSTEREOTYPED_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the ISASSOCIATIONCLASS_EDGE_DEFAULT_FONT property
    defaultCdPreference.put(CdDiagramPreferenceConstants.ISASSOCIATIONCLASS_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the ISASSOCIATIONCLASS_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultCdPreference.put(CdDiagramPreferenceConstants.ISASSOCIATIONCLASS_EDGE_DEFAULT_FOREGROUND_COLOR,
            "192,192,192");

    // Initialize the default value of the ISASSOCIATIONCLASS_EDGE_DEFAULT_ROUTER property
    defaultCdPreference.put(CdDiagramPreferenceConstants.ISASSOCIATIONCLASS_EDGE_DEFAULT_ROUTER,
            "ObliqueRouter");

    // Initialize the default value of the INCLUDE_EDGE_DEFAULT_FONT property
    defaultCdPreference.put(CdDiagramPreferenceConstants.INCLUDE_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the INCLUDE_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultCdPreference.put(CdDiagramPreferenceConstants.INCLUDE_EDGE_DEFAULT_FOREGROUND_COLOR, "192,192,192");

    // Initialize the default value of the INCLUDE_EDGE_DEFAULT_ROUTER property
    defaultCdPreference.put(CdDiagramPreferenceConstants.INCLUDE_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the HASVIEW_EDGE_DEFAULT_FONT property
    defaultCdPreference.put(CdDiagramPreferenceConstants.HASVIEW_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the HASVIEW_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultCdPreference.put(CdDiagramPreferenceConstants.HASVIEW_EDGE_DEFAULT_FOREGROUND_COLOR, "0,128,128");

    // Initialize the default value of the HASVIEW_EDGE_DEFAULT_ROUTER property
    defaultCdPreference.put(CdDiagramPreferenceConstants.HASVIEW_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the GENERALIZATION_EDGE_DEFAULT_FONT property
    defaultCdPreference.put(CdDiagramPreferenceConstants.GENERALIZATION_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the GENERALIZATION_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultCdPreference.put(CdDiagramPreferenceConstants.GENERALIZATION_EDGE_DEFAULT_FOREGROUND_COLOR,
            "0,0,255");

    // Initialize the default value of the GENERALIZATION_EDGE_DEFAULT_ROUTER property
    defaultCdPreference.put(CdDiagramPreferenceConstants.GENERALIZATION_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the HASASPECT_EDGE_DEFAULT_FONT property
    defaultCdPreference.put(CdDiagramPreferenceConstants.HASASPECT_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the HASASPECT_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultCdPreference.put(CdDiagramPreferenceConstants.HASASPECT_EDGE_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the HASASPECT_EDGE_DEFAULT_ROUTER property
    defaultCdPreference.put(CdDiagramPreferenceConstants.HASASPECT_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the DEPENDS_EDGE_DEFAULT_FONT property
    defaultCdPreference.put(CdDiagramPreferenceConstants.DEPENDS_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the DEPENDS_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultCdPreference.put(CdDiagramPreferenceConstants.DEPENDS_EDGE_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the DEPENDS_EDGE_DEFAULT_ROUTER property
    defaultCdPreference.put(CdDiagramPreferenceConstants.DEPENDS_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    return defaultCdPreference;
}

From source file:com.bluexml.side.Portal.modeler.diagram.preferences.PdDiagramTopcasedPreferenceInitializer.java

License:Open Source License

/** 
 * @see org.topcased.modeler.preferences.ITopcasedPreferenceInitializer#getDefaultPreference()
 *   @generated/*  w ww  .j a  v  a 2 s  .c o  m*/
 */
public HashMap<String, String> getDefaultPreference() {
    HashMap<String, String> defaultPdPreference = new HashMap<String, String>();
    // Initialize the default value of the PAGE_DEFAULT_BACKGROUND_COLOR property 
    defaultPdPreference.put(PdDiagramPreferenceConstants.PAGE_DEFAULT_BACKGROUND_COLOR, "157,210,60");

    // Initialize the default value of the PAGE_DEFAULT_FOREGROUND_COLOR property
    defaultPdPreference.put(PdDiagramPreferenceConstants.PAGE_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the PAGE_DEFAULT_FONT property
    defaultPdPreference.put(PdDiagramPreferenceConstants.PAGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the ISCHILDPAGE_EDGE_DEFAULT_FONT property
    defaultPdPreference.put(PdDiagramPreferenceConstants.ISCHILDPAGE_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the ISCHILDPAGE_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultPdPreference.put(PdDiagramPreferenceConstants.ISCHILDPAGE_EDGE_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the ISCHILDPAGE_EDGE_DEFAULT_ROUTER property
    defaultPdPreference.put(PdDiagramPreferenceConstants.ISCHILDPAGE_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the PORTALLAYOUT_DEFAULT_BACKGROUND_COLOR property 
    defaultPdPreference.put(PdDiagramPreferenceConstants.PORTALLAYOUT_DEFAULT_BACKGROUND_COLOR, "202,223,83");

    // Initialize the default value of the PORTALLAYOUT_DEFAULT_FOREGROUND_COLOR property
    defaultPdPreference.put(PdDiagramPreferenceConstants.PORTALLAYOUT_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the PORTALLAYOUT_DEFAULT_FONT property
    defaultPdPreference.put(PdDiagramPreferenceConstants.PORTALLAYOUT_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the USELAYOUT_EDGE_DEFAULT_FONT property
    defaultPdPreference.put(PdDiagramPreferenceConstants.USELAYOUT_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the USELAYOUT_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultPdPreference.put(PdDiagramPreferenceConstants.USELAYOUT_EDGE_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the USELAYOUT_EDGE_DEFAULT_ROUTER property
    defaultPdPreference.put(PdDiagramPreferenceConstants.USELAYOUT_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the PORTLET_DEFAULT_BACKGROUND_COLOR property 
    defaultPdPreference.put(PdDiagramPreferenceConstants.PORTLET_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the PORTLET_DEFAULT_FOREGROUND_COLOR property
    defaultPdPreference.put(PdDiagramPreferenceConstants.PORTLET_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the PORTLET_DEFAULT_FONT property
    defaultPdPreference.put(PdDiagramPreferenceConstants.PORTLET_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the PORTLETTYPE_DEFAULT_BACKGROUND_COLOR property 
    defaultPdPreference.put(PdDiagramPreferenceConstants.PORTLETTYPE_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the PORTLETTYPE_DEFAULT_FOREGROUND_COLOR property
    defaultPdPreference.put(PdDiagramPreferenceConstants.PORTLETTYPE_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the PORTLETTYPE_DEFAULT_FONT property
    defaultPdPreference.put(PdDiagramPreferenceConstants.PORTLETTYPE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the PORTLETINTERNAL_DEFAULT_BACKGROUND_COLOR property 
    defaultPdPreference.put(PdDiagramPreferenceConstants.PORTLETINTERNAL_DEFAULT_BACKGROUND_COLOR,
            "255,255,255");

    // Initialize the default value of the PORTLETINTERNAL_DEFAULT_FOREGROUND_COLOR property
    defaultPdPreference.put(PdDiagramPreferenceConstants.PORTLETINTERNAL_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the PORTLETINTERNAL_DEFAULT_FONT property
    defaultPdPreference.put(PdDiagramPreferenceConstants.PORTLETINTERNAL_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the ISINTERNALPORTLET_EDGE_DEFAULT_FONT property
    defaultPdPreference.put(PdDiagramPreferenceConstants.ISINTERNALPORTLET_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the ISINTERNALPORTLET_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultPdPreference.put(PdDiagramPreferenceConstants.ISINTERNALPORTLET_EDGE_DEFAULT_FOREGROUND_COLOR,
            "0,0,0");

    // Initialize the default value of the ISINTERNALPORTLET_EDGE_DEFAULT_ROUTER property
    defaultPdPreference.put(PdDiagramPreferenceConstants.ISINTERNALPORTLET_EDGE_DEFAULT_ROUTER,
            "ObliqueRouter");

    // Initialize the default value of the HAVEPORTLET_EDGE_DEFAULT_FONT property
    defaultPdPreference.put(PdDiagramPreferenceConstants.HAVEPORTLET_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the HAVEPORTLET_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultPdPreference.put(PdDiagramPreferenceConstants.HAVEPORTLET_EDGE_DEFAULT_FOREGROUND_COLOR, "231,5,5");

    // Initialize the default value of the HAVEPORTLET_EDGE_DEFAULT_ROUTER property
    defaultPdPreference.put(PdDiagramPreferenceConstants.HAVEPORTLET_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the INSTANCIATEPORTLETTYPE_EDGE_DEFAULT_FONT property
    defaultPdPreference.put(PdDiagramPreferenceConstants.INSTANCIATEPORTLETTYPE_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the INSTANCIATEPORTLETTYPE_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultPdPreference.put(PdDiagramPreferenceConstants.INSTANCIATEPORTLETTYPE_EDGE_DEFAULT_FOREGROUND_COLOR,
            "0,0,0");

    // Initialize the default value of the INSTANCIATEPORTLETTYPE_EDGE_DEFAULT_ROUTER property
    defaultPdPreference.put(PdDiagramPreferenceConstants.INSTANCIATEPORTLETTYPE_EDGE_DEFAULT_ROUTER,
            "ObliqueRouter");

    return defaultPdPreference;
}

From source file:com.bluexml.side.Requirements.modeler.goalDiagram.preferences.ReqDiagramTopcasedPreferenceInitializer.java

License:Open Source License

/** 
 * @see org.topcased.modeler.preferences.ITopcasedPreferenceInitializer#getDefaultPreference()
 *   @generated/* ww  w .  j a v a2 s  . c  o m*/
 */
public HashMap<String, String> getDefaultPreference() {
    HashMap<String, String> defaultReqPreference = new HashMap<String, String>();
    // Initialize the default value of the IS_RESPONSIBLE_EDGE_DEFAULT_FONT property
    defaultReqPreference.put(ReqDiagramPreferenceConstants.IS_RESPONSIBLE_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the IS_RESPONSIBLE_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultReqPreference.put(ReqDiagramPreferenceConstants.IS_RESPONSIBLE_EDGE_DEFAULT_FOREGROUND_COLOR,
            "247,165,0");

    // Initialize the default value of the IS_RESPONSIBLE_EDGE_DEFAULT_ROUTER property
    defaultReqPreference.put(ReqDiagramPreferenceConstants.IS_RESPONSIBLE_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the IS_SUB_GOAL_EDGE_DEFAULT_FONT property
    defaultReqPreference.put(ReqDiagramPreferenceConstants.IS_SUB_GOAL_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the IS_SUB_GOAL_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultReqPreference.put(ReqDiagramPreferenceConstants.IS_SUB_GOAL_EDGE_DEFAULT_FOREGROUND_COLOR,
            "0,78,155");

    // Initialize the default value of the IS_SUB_GOAL_EDGE_DEFAULT_ROUTER property
    defaultReqPreference.put(ReqDiagramPreferenceConstants.IS_SUB_GOAL_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the RELATIONSHIP_EDGE_DEFAULT_FONT property
    defaultReqPreference.put(ReqDiagramPreferenceConstants.RELATIONSHIP_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the RELATIONSHIP_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultReqPreference.put(ReqDiagramPreferenceConstants.RELATIONSHIP_EDGE_DEFAULT_FOREGROUND_COLOR,
            "136,43,172");

    // Initialize the default value of the RELATIONSHIP_EDGE_DEFAULT_ROUTER property
    defaultReqPreference.put(ReqDiagramPreferenceConstants.RELATIONSHIP_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the GOAL_DEFAULT_BACKGROUND_COLOR property 
    defaultReqPreference.put(ReqDiagramPreferenceConstants.GOAL_DEFAULT_BACKGROUND_COLOR, "184,231,255");

    // Initialize the default value of the GOAL_DEFAULT_FOREGROUND_COLOR property
    defaultReqPreference.put(ReqDiagramPreferenceConstants.GOAL_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the GOAL_DEFAULT_FONT property
    defaultReqPreference.put(ReqDiagramPreferenceConstants.GOAL_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the AGENT_DEFAULT_BACKGROUND_COLOR property 
    defaultReqPreference.put(ReqDiagramPreferenceConstants.AGENT_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the AGENT_DEFAULT_FOREGROUND_COLOR property
    defaultReqPreference.put(ReqDiagramPreferenceConstants.AGENT_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the AGENT_DEFAULT_FONT property
    defaultReqPreference.put(ReqDiagramPreferenceConstants.AGENT_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the ENTITY_DEFAULT_BACKGROUND_COLOR property 
    defaultReqPreference.put(ReqDiagramPreferenceConstants.ENTITY_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the ENTITY_DEFAULT_FOREGROUND_COLOR property
    defaultReqPreference.put(ReqDiagramPreferenceConstants.ENTITY_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the ENTITY_DEFAULT_FONT property
    defaultReqPreference.put(ReqDiagramPreferenceConstants.ENTITY_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the ATTRIBUTE_DEFAULT_BACKGROUND_COLOR property 
    defaultReqPreference.put(ReqDiagramPreferenceConstants.ATTRIBUTE_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the ATTRIBUTE_DEFAULT_FOREGROUND_COLOR property
    defaultReqPreference.put(ReqDiagramPreferenceConstants.ATTRIBUTE_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the ATTRIBUTE_DEFAULT_FONT property
    defaultReqPreference.put(ReqDiagramPreferenceConstants.ATTRIBUTE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the PRIVILEGE_DEFAULT_BACKGROUND_COLOR property 
    defaultReqPreference.put(ReqDiagramPreferenceConstants.PRIVILEGE_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the PRIVILEGE_DEFAULT_FOREGROUND_COLOR property
    defaultReqPreference.put(ReqDiagramPreferenceConstants.PRIVILEGE_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the PRIVILEGE_DEFAULT_FONT property
    defaultReqPreference.put(ReqDiagramPreferenceConstants.PRIVILEGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the PRIVILEGEGROUP_EDGE_DEFAULT_FONT property
    defaultReqPreference.put(ReqDiagramPreferenceConstants.PRIVILEGEGROUP_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the PRIVILEGEGROUP_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultReqPreference.put(ReqDiagramPreferenceConstants.PRIVILEGEGROUP_EDGE_DEFAULT_FOREGROUND_COLOR,
            "72,230,89");

    // Initialize the default value of the PRIVILEGEGROUP_EDGE_DEFAULT_ROUTER property
    defaultReqPreference.put(ReqDiagramPreferenceConstants.PRIVILEGEGROUP_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    return defaultReqPreference;
}

From source file:com.bluexml.side.Requirements.modeler.processDiagram.preferences.ProDiagramTopcasedPreferenceInitializer.java

License:Open Source License

/** 
 * @see org.topcased.modeler.preferences.ITopcasedPreferenceInitializer#getDefaultPreference()
 *   @generated/*from www.  j  a v  a  2s .c o  m*/
 */
public HashMap<String, String> getDefaultPreference() {
    HashMap<String, String> defaultProPreference = new HashMap<String, String>();
    // Initialize the default value of the IS_RESPONSIBLE_EDGE_DEFAULT_FONT property
    defaultProPreference.put(ProDiagramPreferenceConstants.IS_RESPONSIBLE_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the IS_RESPONSIBLE_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultProPreference.put(ProDiagramPreferenceConstants.IS_RESPONSIBLE_EDGE_DEFAULT_FOREGROUND_COLOR,
            "247,165,0");

    // Initialize the default value of the IS_RESPONSIBLE_EDGE_DEFAULT_ROUTER property
    defaultProPreference.put(ProDiagramPreferenceConstants.IS_RESPONSIBLE_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the IS_SUB_GOAL_EDGE_DEFAULT_FONT property
    defaultProPreference.put(ProDiagramPreferenceConstants.IS_SUB_GOAL_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the IS_SUB_GOAL_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultProPreference.put(ProDiagramPreferenceConstants.IS_SUB_GOAL_EDGE_DEFAULT_FOREGROUND_COLOR,
            "0,78,155");

    // Initialize the default value of the IS_SUB_GOAL_EDGE_DEFAULT_ROUTER property
    defaultProPreference.put(ProDiagramPreferenceConstants.IS_SUB_GOAL_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the RELATIONSHIP_EDGE_DEFAULT_FONT property
    defaultProPreference.put(ProDiagramPreferenceConstants.RELATIONSHIP_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the RELATIONSHIP_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultProPreference.put(ProDiagramPreferenceConstants.RELATIONSHIP_EDGE_DEFAULT_FOREGROUND_COLOR,
            "136,43,172");

    // Initialize the default value of the RELATIONSHIP_EDGE_DEFAULT_ROUTER property
    defaultProPreference.put(ProDiagramPreferenceConstants.RELATIONSHIP_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the GOAL_DEFAULT_BACKGROUND_COLOR property 
    defaultProPreference.put(ProDiagramPreferenceConstants.GOAL_DEFAULT_BACKGROUND_COLOR, "184,231,255");

    // Initialize the default value of the GOAL_DEFAULT_FOREGROUND_COLOR property
    defaultProPreference.put(ProDiagramPreferenceConstants.GOAL_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the GOAL_DEFAULT_FONT property
    defaultProPreference.put(ProDiagramPreferenceConstants.GOAL_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the AGENT_DEFAULT_BACKGROUND_COLOR property 
    defaultProPreference.put(ProDiagramPreferenceConstants.AGENT_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the AGENT_DEFAULT_FOREGROUND_COLOR property
    defaultProPreference.put(ProDiagramPreferenceConstants.AGENT_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the AGENT_DEFAULT_FONT property
    defaultProPreference.put(ProDiagramPreferenceConstants.AGENT_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the ENTITY_DEFAULT_BACKGROUND_COLOR property 
    defaultProPreference.put(ProDiagramPreferenceConstants.ENTITY_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the ENTITY_DEFAULT_FOREGROUND_COLOR property
    defaultProPreference.put(ProDiagramPreferenceConstants.ENTITY_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the ENTITY_DEFAULT_FONT property
    defaultProPreference.put(ProDiagramPreferenceConstants.ENTITY_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the ATTRIBUTE_DEFAULT_BACKGROUND_COLOR property 
    defaultProPreference.put(ProDiagramPreferenceConstants.ATTRIBUTE_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the ATTRIBUTE_DEFAULT_FOREGROUND_COLOR property
    defaultProPreference.put(ProDiagramPreferenceConstants.ATTRIBUTE_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the ATTRIBUTE_DEFAULT_FONT property
    defaultProPreference.put(ProDiagramPreferenceConstants.ATTRIBUTE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the PRIVILEGE_DEFAULT_BACKGROUND_COLOR property 
    defaultProPreference.put(ProDiagramPreferenceConstants.PRIVILEGE_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the PRIVILEGE_DEFAULT_FOREGROUND_COLOR property
    defaultProPreference.put(ProDiagramPreferenceConstants.PRIVILEGE_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the PRIVILEGE_DEFAULT_FONT property
    defaultProPreference.put(ProDiagramPreferenceConstants.PRIVILEGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the PRIVILEGEGROUP_EDGE_DEFAULT_FONT property
    defaultProPreference.put(ProDiagramPreferenceConstants.PRIVILEGEGROUP_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the PRIVILEGEGROUP_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultProPreference.put(ProDiagramPreferenceConstants.PRIVILEGEGROUP_EDGE_DEFAULT_FOREGROUND_COLOR,
            "72,230,89");

    // Initialize the default value of the PRIVILEGEGROUP_EDGE_DEFAULT_ROUTER property
    defaultProPreference.put(ProDiagramPreferenceConstants.PRIVILEGEGROUP_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the GOALSTEP_EDGE_DEFAULT_FONT property
    defaultProPreference.put(ProDiagramPreferenceConstants.GOALSTEP_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the GOALSTEP_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultProPreference.put(ProDiagramPreferenceConstants.GOALSTEP_EDGE_DEFAULT_FOREGROUND_COLOR,
            "156,199,188");

    // Initialize the default value of the GOALSTEP_EDGE_DEFAULT_ROUTER property
    defaultProPreference.put(ProDiagramPreferenceConstants.GOALSTEP_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the IS_PARENT_EDGE_DEFAULT_FONT property
    defaultProPreference.put(ProDiagramPreferenceConstants.IS_PARENT_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the IS_PARENT_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultProPreference.put(ProDiagramPreferenceConstants.IS_PARENT_EDGE_DEFAULT_FOREGROUND_COLOR, "50,50,50");

    // Initialize the default value of the IS_PARENT_EDGE_DEFAULT_ROUTER property
    defaultProPreference.put(ProDiagramPreferenceConstants.IS_PARENT_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    return defaultProPreference;
}

From source file:com.bluexml.side.Workflow.modeler.diagram.preferences.WfDiagramTopcasedPreferenceInitializer.java

License:Open Source License

/** 
 * @see org.topcased.modeler.preferences.ITopcasedPreferenceInitializer#getDefaultPreference()
 *   @generated//  w w  w  .j  a  v a2s  . c o m
 */
public HashMap<String, String> getDefaultPreference() {
    HashMap<String, String> defaultWfPreference = new HashMap<String, String>();
    // Initialize the default value of the TASKNODE_DEFAULT_BACKGROUND_COLOR property 
    defaultWfPreference.put(WfDiagramPreferenceConstants.TASKNODE_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the TASKNODE_DEFAULT_FOREGROUND_COLOR property
    defaultWfPreference.put(WfDiagramPreferenceConstants.TASKNODE_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the TASKNODE_DEFAULT_FONT property
    defaultWfPreference.put(WfDiagramPreferenceConstants.TASKNODE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the NODE_DEFAULT_BACKGROUND_COLOR property 
    defaultWfPreference.put(WfDiagramPreferenceConstants.NODE_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the NODE_DEFAULT_FOREGROUND_COLOR property
    defaultWfPreference.put(WfDiagramPreferenceConstants.NODE_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the NODE_DEFAULT_FONT property
    defaultWfPreference.put(WfDiagramPreferenceConstants.NODE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the STARTSTATE_DEFAULT_BACKGROUND_COLOR property 
    defaultWfPreference.put(WfDiagramPreferenceConstants.STARTSTATE_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the STARTSTATE_DEFAULT_FOREGROUND_COLOR property
    defaultWfPreference.put(WfDiagramPreferenceConstants.STARTSTATE_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the STARTSTATE_DEFAULT_FONT property
    defaultWfPreference.put(WfDiagramPreferenceConstants.STARTSTATE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the ENDSTATE_DEFAULT_BACKGROUND_COLOR property 
    defaultWfPreference.put(WfDiagramPreferenceConstants.ENDSTATE_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the ENDSTATE_DEFAULT_FOREGROUND_COLOR property
    defaultWfPreference.put(WfDiagramPreferenceConstants.ENDSTATE_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the ENDSTATE_DEFAULT_FONT property
    defaultWfPreference.put(WfDiagramPreferenceConstants.ENDSTATE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the EVENT_DEFAULT_BACKGROUND_COLOR property 
    defaultWfPreference.put(WfDiagramPreferenceConstants.EVENT_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the EVENT_DEFAULT_FOREGROUND_COLOR property
    defaultWfPreference.put(WfDiagramPreferenceConstants.EVENT_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the EVENT_DEFAULT_FONT property
    defaultWfPreference.put(WfDiagramPreferenceConstants.EVENT_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the ACTION_DEFAULT_BACKGROUND_COLOR property 
    defaultWfPreference.put(WfDiagramPreferenceConstants.ACTION_DEFAULT_BACKGROUND_COLOR, "166,210,210");

    // Initialize the default value of the ACTION_DEFAULT_FOREGROUND_COLOR property
    defaultWfPreference.put(WfDiagramPreferenceConstants.ACTION_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the ACTION_DEFAULT_FONT property
    defaultWfPreference.put(WfDiagramPreferenceConstants.ACTION_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the SWIMLANE_DEFAULT_BACKGROUND_COLOR property 
    defaultWfPreference.put(WfDiagramPreferenceConstants.SWIMLANE_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the SWIMLANE_DEFAULT_FOREGROUND_COLOR property
    defaultWfPreference.put(WfDiagramPreferenceConstants.SWIMLANE_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the SWIMLANE_DEFAULT_FONT property
    defaultWfPreference.put(WfDiagramPreferenceConstants.SWIMLANE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the DECISION_DEFAULT_BACKGROUND_COLOR property 
    defaultWfPreference.put(WfDiagramPreferenceConstants.DECISION_DEFAULT_BACKGROUND_COLOR, "211,226,205");

    // Initialize the default value of the DECISION_DEFAULT_FOREGROUND_COLOR property
    defaultWfPreference.put(WfDiagramPreferenceConstants.DECISION_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the DECISION_DEFAULT_FONT property
    defaultWfPreference.put(WfDiagramPreferenceConstants.DECISION_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the FORK_DEFAULT_BACKGROUND_COLOR property 
    defaultWfPreference.put(WfDiagramPreferenceConstants.FORK_DEFAULT_BACKGROUND_COLOR, "211,226,205");

    // Initialize the default value of the FORK_DEFAULT_FOREGROUND_COLOR property
    defaultWfPreference.put(WfDiagramPreferenceConstants.FORK_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the FORK_DEFAULT_FONT property
    defaultWfPreference.put(WfDiagramPreferenceConstants.FORK_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the JOIN_DEFAULT_BACKGROUND_COLOR property 
    defaultWfPreference.put(WfDiagramPreferenceConstants.JOIN_DEFAULT_BACKGROUND_COLOR, "211,226,205");

    // Initialize the default value of the JOIN_DEFAULT_FOREGROUND_COLOR property
    defaultWfPreference.put(WfDiagramPreferenceConstants.JOIN_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the JOIN_DEFAULT_FONT property
    defaultWfPreference.put(WfDiagramPreferenceConstants.JOIN_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the TIMER_DEFAULT_BACKGROUND_COLOR property 
    defaultWfPreference.put(WfDiagramPreferenceConstants.TIMER_DEFAULT_BACKGROUND_COLOR, "211,226,205");

    // Initialize the default value of the TIMER_DEFAULT_FOREGROUND_COLOR property
    defaultWfPreference.put(WfDiagramPreferenceConstants.TIMER_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the TIMER_DEFAULT_FONT property
    defaultWfPreference.put(WfDiagramPreferenceConstants.TIMER_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the TRANSITION_EDGE_DEFAULT_FONT property
    defaultWfPreference.put(WfDiagramPreferenceConstants.TRANSITION_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the TRANSITION_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultWfPreference.put(WfDiagramPreferenceConstants.TRANSITION_EDGE_DEFAULT_FOREGROUND_COLOR,
            "156,199,188");

    // Initialize the default value of the TRANSITION_EDGE_DEFAULT_ROUTER property
    defaultWfPreference.put(WfDiagramPreferenceConstants.TRANSITION_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the MANAGE_EDGE_DEFAULT_FONT property
    defaultWfPreference.put(WfDiagramPreferenceConstants.MANAGE_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the MANAGE_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultWfPreference.put(WfDiagramPreferenceConstants.MANAGE_EDGE_DEFAULT_FOREGROUND_COLOR, "27,134,199");

    // Initialize the default value of the MANAGE_EDGE_DEFAULT_ROUTER property
    defaultWfPreference.put(WfDiagramPreferenceConstants.MANAGE_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the INITIALIZE_EDGE_DEFAULT_FONT property
    defaultWfPreference.put(WfDiagramPreferenceConstants.INITIALIZE_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the INITIALIZE_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultWfPreference.put(WfDiagramPreferenceConstants.INITIALIZE_EDGE_DEFAULT_FOREGROUND_COLOR,
            "27,134,199");

    // Initialize the default value of the INITIALIZE_EDGE_DEFAULT_ROUTER property
    defaultWfPreference.put(WfDiagramPreferenceConstants.INITIALIZE_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the ACTIONS_EDGE_DEFAULT_FONT property
    defaultWfPreference.put(WfDiagramPreferenceConstants.ACTIONS_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the ACTIONS_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultWfPreference.put(WfDiagramPreferenceConstants.ACTIONS_EDGE_DEFAULT_FOREGROUND_COLOR, "34,40,161");

    // Initialize the default value of the ACTIONS_EDGE_DEFAULT_ROUTER property
    defaultWfPreference.put(WfDiagramPreferenceConstants.ACTIONS_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the HASTIMER_EDGE_DEFAULT_FONT property
    defaultWfPreference.put(WfDiagramPreferenceConstants.HASTIMER_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the HASTIMER_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultWfPreference.put(WfDiagramPreferenceConstants.HASTIMER_EDGE_DEFAULT_FOREGROUND_COLOR, "24,224,0");

    // Initialize the default value of the HASTIMER_EDGE_DEFAULT_ROUTER property
    defaultWfPreference.put(WfDiagramPreferenceConstants.HASTIMER_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    // Initialize the default value of the ATTRIBUTE_DEFAULT_BACKGROUND_COLOR property 
    defaultWfPreference.put(WfDiagramPreferenceConstants.ATTRIBUTE_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the ATTRIBUTE_DEFAULT_FOREGROUND_COLOR property
    defaultWfPreference.put(WfDiagramPreferenceConstants.ATTRIBUTE_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the ATTRIBUTE_DEFAULT_FONT property
    defaultWfPreference.put(WfDiagramPreferenceConstants.ATTRIBUTE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the PROCESSSTATE_DEFAULT_BACKGROUND_COLOR property 
    defaultWfPreference.put(WfDiagramPreferenceConstants.PROCESSSTATE_DEFAULT_BACKGROUND_COLOR, "255,255,255");

    // Initialize the default value of the PROCESSSTATE_DEFAULT_FOREGROUND_COLOR property
    defaultWfPreference.put(WfDiagramPreferenceConstants.PROCESSSTATE_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the PROCESSSTATE_DEFAULT_FONT property
    defaultWfPreference.put(WfDiagramPreferenceConstants.PROCESSSTATE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the CLAZZ_DEFAULT_BACKGROUND_COLOR property 
    defaultWfPreference.put(WfDiagramPreferenceConstants.CLAZZ_DEFAULT_BACKGROUND_COLOR, "25,202,255");

    // Initialize the default value of the CLAZZ_DEFAULT_FOREGROUND_COLOR property
    defaultWfPreference.put(WfDiagramPreferenceConstants.CLAZZ_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the CLAZZ_DEFAULT_FONT property
    defaultWfPreference.put(WfDiagramPreferenceConstants.CLAZZ_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the ISASSOCIATEDWITH_EDGE_DEFAULT_FONT property
    defaultWfPreference.put(WfDiagramPreferenceConstants.ISASSOCIATEDWITH_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Lucida Grande-regular-11").toString());

    // Initialize the default value of the ISASSOCIATEDWITH_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultWfPreference.put(WfDiagramPreferenceConstants.ISASSOCIATEDWITH_EDGE_DEFAULT_FOREGROUND_COLOR,
            "49,125,171");

    // Initialize the default value of the ISASSOCIATEDWITH_EDGE_DEFAULT_ROUTER property
    defaultWfPreference.put(WfDiagramPreferenceConstants.ISASSOCIATEDWITH_EDGE_DEFAULT_ROUTER, "ObliqueRouter");

    return defaultWfPreference;
}

From source file:com.cisco.yangide.ext.model.editor.util.StyleUtil.java

License:Open Source License

private static FontData getDefaultFont() {
    FontData fontData = null;// w ww.j av  a 2 s  .c  om
    try {
        fontData = StringConverter.asFontData(Activator.getDefault().getPreferenceStore()
                .getString(ModelEditorPreferences.DIAGRAM_EDITOR_FONT));
    } catch (DataFormatException e) {
        // ignore incorrect format
    }
    if (fontData == null) {
        FontData fd = JFaceResources.getDefaultFont().getFontData()[0];
        // workaround for issue with MacOS fonts
        if ("Helvetica Neue Deskinterface".equals(fd.getName()) && fd.getHeight() == 11) {
            fd.setName("Helvetica");
        }
        return fd;
    }
    return fontData;
}

From source file:org.csstudio.opibuilder.util.MediaService.java

License:Open Source License

private void loadFontFile(String systemFontName) {
    Map<String, OPIFont> rawFontMap = new LinkedHashMap<String, OPIFont>();
    Set<String> trimmedNameSet = new LinkedHashSet<String>();
    fontFilePath = PreferencesHelper.getFontFilePath();
    if (fontFilePath == null || fontFilePath.isEmpty()) {
        return;//from w  ww.  j a v  a  2s  . co m
    }

    try {
        // read file
        InputStream inputStream = ResourceUtil.pathToInputStream(fontFilePath, false);

        BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
        String line;
        // fill the font map.
        while ((line = reader.readLine()) != null) {
            // support comments
            if (line.trim().startsWith("#") || line.trim().startsWith("//")) //$NON-NLS-1$ //$NON-NLS-2$
                continue;
            int i;
            if ((i = line.indexOf('=')) != -1) {
                boolean isPixels = PreferencesHelper.isDefaultFontSizeInPixels();
                String name = line.substring(0, i).trim();
                String trimmedName = name;
                if (name.contains("(")) //$NON-NLS-1$
                    trimmedName = name.substring(0, name.indexOf("(")); //$NON-NLS-1$
                trimmedNameSet.add(trimmedName);
                try {
                    String trimmedLine = line.substring(i + 1).trim();
                    if (trimmedLine.endsWith("px")) { //$NON-NLS-1$
                        isPixels = true;
                        trimmedLine = trimmedLine.substring(0, trimmedLine.length() - 2);
                    } else if (line.endsWith("pt")) { //$NON-NLS-1$
                        isPixels = false;
                        trimmedLine = trimmedLine.substring(0, trimmedLine.length() - 2);
                    }

                    // BOY only handles "Liberation Sans-regular-12",
                    // while Display Builder allows additional spaces as in
                    // "Liberation Sans - regular - 12".
                    // Patch line to be upwards-compatible
                    trimmedLine = trimmedLine.replaceAll(" +- +", "-"); //$NON-NLS-1$ //$NON-NLS-2$
                    FontData fontdata = StringConverter.asFontData(trimmedLine);
                    if (fontdata.getName().equals("SystemDefault")) //$NON-NLS-1$
                        fontdata.setName(systemFontName);
                    OPIFont font = new OPIFont(trimmedName, fontdata);
                    font.setSizeInPixels(isPixels);
                    rawFontMap.put(name, font);
                } catch (DataFormatException e) {
                    String message = "Format error in font definition file.";
                    OPIBuilderPlugin.getLogger().log(Level.WARNING, message, e);
                    ConsoleService.getInstance().writeError(message);
                }
            }
        }
        inputStream.close();
        reader.close();
    } catch (Exception e) {
        String message = "Failed to read font definition file.";
        OPIBuilderPlugin.getLogger().log(Level.WARNING, message, e);
        ConsoleService.getInstance().writeWarning(message);
    }

    String osname = getOSName();
    for (String trimmedName : trimmedNameSet) {
        String equippedName = trimmedName + "(" + osname + ")"; //$NON-NLS-1$ //$NON-NLS-2$
        if (rawFontMap.containsKey(equippedName))
            fontMap.put(trimmedName, rawFontMap.get(equippedName));
        else if (rawFontMap.containsKey(trimmedName))
            fontMap.put(trimmedName, rawFontMap.get(trimmedName));
    }

}

From source file:org.topcased.modeler.uml.componentdiagram.preferences.ComponentDiagramTopcasedPreferenceInitializer.java

License:Open Source License

/**
 * @see org.topcased.modeler.preferences.ITopcasedPreferenceInitializer#getDefaultPreference()
 *///from w  w  w .  j  a  v a  2 s .com
public HashMap<String, String> getDefaultPreference() {
    HashMap<String, String> defaultComponentPreference = new HashMap<String, String>();

    // Initialize the default value of the COMPONENT_DEFAULT_BACKGROUND_COLOR property
    defaultComponentPreference.put(ComponentDiagramPreferenceConstants.COMPONENT_DEFAULT_BACKGROUND_COLOR,
            "255,255,255");

    // Initialize the default value of the COMPONENT_DEFAULT_FOREGROUND_COLOR property
    defaultComponentPreference.put(ComponentDiagramPreferenceConstants.COMPONENT_DEFAULT_FOREGROUND_COLOR,
            "0,0,0");

    // Initialize the default value of the COMPONENT_DEFAULT_FONT property
    defaultComponentPreference.put(ComponentDiagramPreferenceConstants.COMPONENT_DEFAULT_FONT,
            StringConverter.asFontData("Sans-bold-10").toString());

    // Initialize the default value of the INTERFACE_DEFAULT_BACKGROUND_COLOR property
    defaultComponentPreference.put(ComponentDiagramPreferenceConstants.INTERFACE_DEFAULT_BACKGROUND_COLOR,
            "255,255,255");

    // Initialize the default value of the INTERFACE_DEFAULT_FOREGROUND_COLOR property
    defaultComponentPreference.put(ComponentDiagramPreferenceConstants.INTERFACE_DEFAULT_FOREGROUND_COLOR,
            "0,0,0");

    // Initialize the default value of the INTERFACE_DEFAULT_FONT property
    defaultComponentPreference.put(ComponentDiagramPreferenceConstants.INTERFACE_DEFAULT_FONT,
            StringConverter.asFontData("Tahoma-regular-8").toString());

    // Initialize the default value of the PORT_DEFAULT_BACKGROUND_COLOR property
    defaultComponentPreference.put(ComponentDiagramPreferenceConstants.PORT_DEFAULT_BACKGROUND_COLOR,
            "255,255,255");

    // Initialize the default value of the PORT_DEFAULT_FOREGROUND_COLOR property
    defaultComponentPreference.put(ComponentDiagramPreferenceConstants.PORT_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the PORT_DEFAULT_FONT property
    defaultComponentPreference.put(ComponentDiagramPreferenceConstants.PORT_DEFAULT_FONT,
            StringConverter.asFontData("Sans-regular-10").toString());

    // Initialize the default value of the COMPONENTREALIZATION_EDGE_DEFAULT_FONT property
    defaultComponentPreference.put(ComponentDiagramPreferenceConstants.COMPONENTREALIZATION_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Sans-regular-10").toString());

    // Initialize the default value of the COMPONENTREALIZATION_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultComponentPreference.put(
            ComponentDiagramPreferenceConstants.COMPONENTREALIZATION_EDGE_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the COMPONENTREALIZATION_EDGE_DEFAULT_ROUTER property
    defaultComponentPreference.put(ComponentDiagramPreferenceConstants.COMPONENTREALIZATION_EDGE_DEFAULT_ROUTER,
            "ObliqueRouter");

    // Initialize the default value of the COMPONENTREALIZATION_STEREOTYPE_EDGE_OBJECT_DEFAULT_VISIBILITY property
    defaultComponentPreference.put(
            ComponentDiagramPreferenceConstants.COMPONENTREALIZATION_STEREOTYPE_EDGE_OBJECT_DEFAULT_VISIBILITY,
            "true");

    // Initialize the default value of the INTERFACEREALIZATION_EDGE_DEFAULT_FONT property
    defaultComponentPreference.put(ComponentDiagramPreferenceConstants.INTERFACEREALIZATION_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Tahoma-regular-8").toString());

    // Initialize the default value of the INTERFACEREALIZATION_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultComponentPreference.put(
            ComponentDiagramPreferenceConstants.INTERFACEREALIZATION_EDGE_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the INTERFACEREALIZATION_EDGE_DEFAULT_ROUTER property
    defaultComponentPreference.put(ComponentDiagramPreferenceConstants.INTERFACEREALIZATION_EDGE_DEFAULT_ROUTER,
            "RectilinearRouter");

    // Initialize the default value of the USAGE_EDGE_DEFAULT_FONT property
    defaultComponentPreference.put(ComponentDiagramPreferenceConstants.USAGE_EDGE_DEFAULT_FONT,
            StringConverter.asFontData("Tahoma-regular-8").toString());

    // Initialize the default value of the USAGE_EDGE_DEFAULT_FOREGROUND_COLOR property
    defaultComponentPreference.put(ComponentDiagramPreferenceConstants.USAGE_EDGE_DEFAULT_FOREGROUND_COLOR,
            "0,0,0");

    // Initialize the default value of the USAGE_EDGE_DEFAULT_ROUTER property
    defaultComponentPreference.put(ComponentDiagramPreferenceConstants.USAGE_EDGE_DEFAULT_ROUTER,
            "RectilinearRouter");

    // Initialize the default value of the COMPONENT_DEFAULT_BACKGROUND_COLOR property
    defaultComponentPreference.put(ComponentDiagramPreferenceConstants.CLASS_DEFAULT_BACKGROUND_COLOR,
            "255,202,200");

    // Initialize the default value of the COMPONENT_DEFAULT_FOREGROUND_COLOR property
    defaultComponentPreference.put(ComponentDiagramPreferenceConstants.CLASS_DEFAULT_FOREGROUND_COLOR, "0,0,0");

    // Initialize the default value of the COMPONENT_DEFAULT_FONT property
    defaultComponentPreference.put(ComponentDiagramPreferenceConstants.CLASS_DEFAULT_FONT,
            StringConverter.asFontData("Sans-bold-10").toString());

    return defaultComponentPreference;
}