当前位置: 首页>>代码示例>>Java>>正文


Java GraphConstants.getBackground方法代码示例

本文整理汇总了Java中org.jgraph.graph.GraphConstants.getBackground方法的典型用法代码示例。如果您正苦于以下问题:Java GraphConstants.getBackground方法的具体用法?Java GraphConstants.getBackground怎么用?Java GraphConstants.getBackground使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jgraph.graph.GraphConstants的用法示例。


在下文中一共展示了GraphConstants.getBackground方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: installAttributes

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
protected void installAttributes (CellView view){
	
	Map map = view.getAllAttributes();
       StateCell cell = (StateCell) view.getCell();

       // store the fill and the line color
       Color bordercolor = GraphConstants.getBorderColor(map);

       // apply the parameter to the bounding box only
       setOpaque(GraphConstants.isOpaque(map));

       bordercolor = GraphConstants.getBorderColor(map);
       
       if (getBorder() == null && bordercolor != null)
       {
           setBorder(BorderFactory.createLineBorder(bordercolor, 1));
       }

       // Set the foreground color
       Color foreground = GraphConstants.getForeground(map);
       
       // The FillColor takes precedence over the background color
       Color background = GraphConstants.getBackground(map);
       
       setBackground(background);

       Font font = GraphConstants.getFont(map);        

       header.setOpaque(false);
       header.setFont(font);
       header.setForeground(foreground);
       header.setBackground(background);
       Icon icon = GraphConstants.getIcon(map);
       header.setIcon(icon);

       internalStateArea.setFont(font);
       internalStateArea.setOpaque(false);        ;
       internalStateArea.setVisible(true);
       internalStateArea.setText(cell.getInternalState());
}
 
开发者ID:tvaquero,项目名称:itsimple,代码行数:41,代码来源:StateRenderer.java

示例2: installAttributes

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
protected void installAttributes (CellView view){
	
	Map map = view.getAllAttributes();
       ObjectCell cell = (ObjectCell) view.getCell();

       // store the fill and the line color
       Color bordercolor = GraphConstants.getBorderColor(map);

       // apply the parameter to the bounding box only
       setOpaque(GraphConstants.isOpaque(map));

       bordercolor = GraphConstants.getBorderColor(map);
       if (bordercolor == null)
       {
          bordercolor = GraphConstants.getBorderColor(map);
       }
       if (getBorder() == null && bordercolor != null)
       {
           setBorder(BorderFactory.createLineBorder(bordercolor, 1));
       }

       // Set the foreground color
       Color foreground = GraphConstants.getForeground(map);        

       // The FillColor takes precedence over the background color
       Color background = GraphConstants.getBackground(map);
       
       setBackground(background);

       Font font = GraphConstants.getFont(map);        

       header.setOpaque(false);
       header.setFont(font);
       header.setForeground(foreground);
       header.setBackground(background);
       Icon icon = GraphConstants.getIcon(map);
       header.setIcon(icon);

       attributesPane.setFont(font);
       attributesPane.setOpaque(false);        
       attributesPane.setVisible(true);
       attributesPane.setText(cell.getObjectAttributes());
}
 
开发者ID:tvaquero,项目名称:itsimple,代码行数:44,代码来源:ObjectRenderer.java

示例3: installAttributes

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
protected void installAttributes (CellView view){
	
	Map map = view.getAllAttributes();
       EnumerationCell cell = (EnumerationCell) view.getCell();

       // store the fill and the line color
       Color bordercolor = GraphConstants.getBorderColor(map);

       // apply the parameter to the bounding box only
       setOpaque(GraphConstants.isOpaque(map));

       bordercolor = GraphConstants.getBorderColor(map);
       /*if (bordercolor == null)
       {
          bordercolor = GraphConstants.getBorderColor(map);
       }*/
       if (getBorder() == null && bordercolor != null)
       {
           setBorder(BorderFactory.createLineBorder(bordercolor, 1));
       }

       // Set the foreground color
       Color foreground = GraphConstants.getForeground(map);
       //if (foreground == null)
       //{
       //   foreground = defaultForeground;
       //}

       // The FillColor takes precedence over the background color
       Color background = GraphConstants.getBackground(map);
       //if (background == null)
       //{
       //  background = defaultBackground;
       //}
       setBackground(background);

       Font font = GraphConstants.getFont(map);        

       header.setOpaque(false);
       header.setFont(font);
       header.setForeground(foreground);        
       Icon icon = GraphConstants.getIcon(map);
       header.setIcon(icon);        

       literalsPane.setFont(font);
       literalsPane.setOpaque(false);
       //suppressAttribute = UMLGraphConstants.getSuppressAttribute(map);
       literalsPane.setVisible(/*!suppressAttribute*/true);

       //setHTML(literalsPane,cell.getClassAttributes());
       literalsPane.setText(cell.getLiterals());
	
}
 
开发者ID:tvaquero,项目名称:itsimple,代码行数:54,代码来源:EnumerationRenderer.java

示例4: installAttributes

import org.jgraph.graph.GraphConstants; //导入方法依赖的package包/类
protected void installAttributes (CellView view){
	
	Map map = view.getAllAttributes();
       ClassCell cell = (ClassCell) view.getCell();

       // store the fill and the line color
       Color bordercolor = GraphConstants.getBorderColor(map);

       // apply the parameter to the bounding box only
       setOpaque(GraphConstants.isOpaque(map));

       bordercolor = GraphConstants.getBorderColor(map);
       if (bordercolor == null)
       {
          bordercolor = GraphConstants.getBorderColor(map);
       }
       if (getBorder() == null && bordercolor != null)
       {
           setBorder(BorderFactory.createLineBorder(bordercolor, 1));
       }

       // Set the foreground color
       Color foreground = GraphConstants.getForeground(map);
       if (foreground == null)
       {
          foreground = defaultForeground;
       }

       // The FillColor takes precedence over the background color
       Color background = GraphConstants.getBackground(map);
       if (background == null)
       {
         background = defaultBackground;
       }
       setBackground(background);

       Font font = GraphConstants.getFont(map);        

       header.setOpaque(false);
       header.setFont(font);
       header.setForeground(foreground);        
       Icon icon = GraphConstants.getIcon(map);
       header.setIcon(icon);        

       attributesPane.setFont(font);
       attributesPane.setOpaque(false);
       //suppressAttribute = UMLGraphConstants.getSuppressAttribute(map);        
       attributesPane.setVisible(true);

       //setHTML(attributesPane,cell.getClassAttributes());
       attributesPane.setText(cell.getClassAttributes());

       operatorsPane.setFont(font);
       operatorsPane.setOpaque(false);
       //suppressOperation = UMLGraphConstants.getSuppressOperation(map);       
       operatorsPane.setVisible(/*!suppressOperation*/true);
       operatorsPane.setText(cell.getClassOperators());
	
}
 
开发者ID:tvaquero,项目名称:itsimple,代码行数:60,代码来源:ClassRenderer.java


注:本文中的org.jgraph.graph.GraphConstants.getBackground方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。