本文整理汇总了Java中org.jgraph.graph.GraphConstants.getBorderColor方法的典型用法代码示例。如果您正苦于以下问题:Java GraphConstants.getBorderColor方法的具体用法?Java GraphConstants.getBorderColor怎么用?Java GraphConstants.getBorderColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jgraph.graph.GraphConstants
的用法示例。
在下文中一共展示了GraphConstants.getBorderColor方法的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());
}
示例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());
}
示例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());
}
示例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());
}