本文整理汇总了Java中org.jgraph.graph.CellView.getAllAttributes方法的典型用法代码示例。如果您正苦于以下问题:Java CellView.getAllAttributes方法的具体用法?Java CellView.getAllAttributes怎么用?Java CellView.getAllAttributes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jgraph.graph.CellView
的用法示例。
在下文中一共展示了CellView.getAllAttributes方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: installAttributes
import org.jgraph.graph.CellView; //导入方法依赖的package包/类
protected void installAttributes(CellView view) {
// Get the oval attributes
Map map = view.getAllAttributes();
// Apply all the component properties
// Apply border
borderColor = TBoardConstants.getBorderColor(map);
if (borderColor != null)
borderWidth = Math.max(1, Math.round(TBoardConstants.getLineWidth(map)));
else borderWidth = 0;
// Apply background and gradient
backgroundColor = TBoardConstants.getBackground(map);
setOpaque((backgroundColor != null));
gradientColor = TBoardConstants.getGradientColor(map);
}
示例2: installAttributes
import org.jgraph.graph.CellView; //导入方法依赖的package包/类
protected void installAttributes(CellView view) {
super.installAttributes(view);
// Initialize id prefix
String idOrder = "";
// Get TGridCell attributes
Map map = view.getAllAttributes();
// If is the first cell (1,1) of the grid
if ((TBoardConstants.getColumn(map) == 1)
&& (TBoardConstants.getRow(map) == 1)) {
// Add an arrow character that symbolizes the grid order
switch (TBoardConstants
.getOrder(((TGrid)((TGridCell)view.getCell()).getParent())
.getAttributes())) {
case TGrid.COLUMNS:
idOrder = "↓ ";
break;
case TGrid.ROWS:
idOrder = "→ ";
break;
case TGrid.CUSTOM:
idOrder = "↺ ";
}
}
// Append the string in the beginning of the grid cell id
id = idOrder + id;
}
示例3: installAttributes
import org.jgraph.graph.CellView; //导入方法依赖的package包/类
protected void installAttributes(CellView view) {
// Get the oval attributes
Map map = view.getAllAttributes();
// Apply all the component properties
// Apply border
borderColor = TBoardConstants.getBorderColor(map);
if (borderColor != null)
borderWidth = Math.max(1, Math.round(TBoardConstants.getLineWidth(map)));
else borderWidth = 0;
// Apply background and gradient
backgroundColor = TBoardConstants.getBackground(map);
setOpaque((backgroundColor != null));
gradientColor = TBoardConstants.getGradientColor(map);
}
示例4: installAttributes
import org.jgraph.graph.CellView; //导入方法依赖的package包/类
protected void installAttributes(CellView view) {
// Get the oval attributes
Map map = view.getAllAttributes();
// Apply all the component properties
// Apply border
Color borderColor = TBoardConstants.getBorderColor(map);
if (borderColor != null) {
int borderWidth = Math.max(1, Math.round(TBoardConstants.getLineWidth(map)));
setBorder(BorderFactory.createLineBorder(borderColor, borderWidth));
} else setBorder(null);
// Apply background and gradient
Color backgroundColor = TBoardConstants.getBackground(map);
setBackground(backgroundColor);
setOpaque((backgroundColor != null));
setGradientColor(TBoardConstants.getGradientColor(map));
}
示例5: installAttributes
import org.jgraph.graph.CellView; //导入方法依赖的package包/类
protected void installAttributes(CellView view) {
Map map = view.getAllAttributes();
startCorner = TBoardConstants.getStartCorner(map);
borderColor = TBoardConstants.getBorderColor(map);
if (borderColor == null)
borderColor = TBoardConstants.DEFAULT_FOREGROUND;
lineWidth = Math.max(1, Math.round(TBoardConstants.getLineWidth(map)));
}
示例6: installAttributes
import org.jgraph.graph.CellView; //导入方法依赖的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());
}
示例7: installAttributes
import org.jgraph.graph.CellView; //导入方法依赖的package包/类
protected void installAttributes(CellView view) {
// Get the text area attributes
Map map = view.getAllAttributes();
// Get the vairables needed in the paint function
id = ((TComponent)view.getCell()).getId();
height = (int)TBoardConstants.getBounds(map).getHeight();
width = (int)TBoardConstants.getBounds(map).getWidth();
// Needed to apply JLabel properties correctly with the html marks
setText("");
// Apply all the component properties
// Apply border
Color borderColor = TBoardConstants.getBorderColor(map);
if (borderColor != null) {
borderWidth = Math.max(1, Math.round(TBoardConstants
.getLineWidth(map)));
setBorder(BorderFactory.createLineBorder(borderColor, borderWidth));
} else {
borderWidth = 0;
setBorder(null);
}
// Apply background and gradient
Color backgroundColor = TBoardConstants.getBackground(map);
setBackground(backgroundColor);
setOpaque((backgroundColor != null));
//if(!TEditor.get_android_mode())
setGradientColor(TBoardConstants.getGradientColor(map));
// Apply text font properties
Font font = TBoardConstants.getFont(map);
if (font == null)
font = TBoardConstants.DEFAULTFONT;
//setFont(TBoardConstants.getFont(map));
//visualizamos la fuente de android si estamos en modo android
if(TEditor.get_android_mode()) font=new Font("Droid Sans",font.getStyle(),font.getSize());
setFont(font);
Color foregroundColor = TBoardConstants.getForeground(map);
setForeground((foregroundColor != null) ? foregroundColor
: TBoardConstants.DEFAULT_FOREGROUND);
// Apply text align properties
String htmlBegin = "<html><body>", text, htmlEnd = "</p></body></html>";
verticalAlignment = TBoardConstants.getVerticalAlignment(map);
horizontalAlignment = TBoardConstants.getHorizontalAlignment(map);
// TUNE Correct vertical alignment html problems
setHorizontalAlignment(horizontalAlignment);
setVerticalAlignment(verticalAlignment);
switch (TBoardConstants.getHorizontalAlignment(map)) {
case SwingConstants.CENTER:
htmlBegin = htmlBegin + "<p align='center'>";
htmlEnd = "</p>";
break;
case SwingConstants.RIGHT:
htmlBegin = htmlBegin + "<p align='right'>";
htmlEnd = " </p>";
}
// Apply text
text = TBoardConstants.getText(map);
if (text == null)
text = "";
setText(htmlBegin + text + htmlEnd);
}
示例8: installAttributes
import org.jgraph.graph.CellView; //导入方法依赖的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());
}
示例9: installAttributes
import org.jgraph.graph.CellView; //导入方法依赖的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());
}
示例10: installAttributes
import org.jgraph.graph.CellView; //导入方法依赖的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());
}