本文整理汇总了Java中org.jgraph.JGraph.isDoubleBuffered方法的典型用法代码示例。如果您正苦于以下问题:Java JGraph.isDoubleBuffered方法的具体用法?Java JGraph.isDoubleBuffered怎么用?Java JGraph.isDoubleBuffered使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jgraph.JGraph
的用法示例。
在下文中一共展示了JGraph.isDoubleBuffered方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRendererComponent
import org.jgraph.JGraph; //导入方法依赖的package包/类
public Component getRendererComponent(JGraph graph, CellView view,
boolean sel, boolean focus, boolean preview) {
gridColor = graph.getGridColor();
highlightColor = graph.getHighlightColor();
lockedHandleColor = graph.getLockedHandleColor();
isDoubleBuffered = graph.isDoubleBuffered();
if (view instanceof VertexView) {
this.view = (VertexView)view;
this.hasFocus = focus;
this.childrenSelected = graph.getSelectionModel()
.isChildrenSelected(view.getCell());
this.selected = sel;
this.preview = preview;
if (this.view.isLeaf()
|| GraphConstants.isGroupOpaque(view.getAllAttributes()))
installAttributes(view);
else
resetAttributes();
return this;
}
return null;
}
示例2: getRendererComponent
import org.jgraph.JGraph; //导入方法依赖的package包/类
public Component getRendererComponent(JGraph graph, CellView view,
boolean sel, boolean focus, boolean preview) {
gridColor = graph.getGridColor();
highlightColor = graph.getHighlightColor();
lockedHandleColor = graph.getLockedHandleColor();
isDoubleBuffered = graph.isDoubleBuffered();
if (view instanceof VertexView) {
this.view = (VertexView) view;
setComponentOrientation(graph.getComponentOrientation());
if (graph.getEditingCell() != view.getCell()) {
Object label = graph.convertValueToString(view);
if (label != null)
setText("<html><center><font size='1'><b>"+label.toString()+"</b></font></center></html>");
else
setText("");
} else
setText("");
this.hasFocus = focus;
this.childrenSelected = graph.getSelectionModel()
.isChildrenSelected(view.getCell());
this.selected = sel;
this.preview = preview;
if (this.view.isLeaf()
|| GraphConstants.isGroupOpaque(view.getAllAttributes()))
installAttributes(view);
else
resetAttributes();
return this;
}
return null;
}
示例3: getRendererComponent
import org.jgraph.JGraph; //导入方法依赖的package包/类
public Component getRendererComponent(JGraph graph, CellView view,
boolean sel, boolean focus, boolean preview) {
gridColor = graph.getGridColor();
highlightColor = graph.getHighlightColor();
lockedHandleColor = graph.getLockedHandleColor();
isDoubleBuffered = graph.isDoubleBuffered();
if (view instanceof VertexView) {
this.view = (VertexView) view;
setComponentOrientation(graph.getComponentOrientation());
if (graph.getEditingCell() != view.getCell()) {
Object label = graph.convertValueToString(view);
if (label != null)
setText("<html><center><font size='1'><b>"+label.toString()+"</b></center></font></html>");
else
setText(null);
} else
setText(null);
this.hasFocus = focus;
this.childrenSelected = graph.getSelectionModel()
.isChildrenSelected(view.getCell());
this.selected = sel;
this.preview = preview;
if (this.view.isLeaf()
|| GraphConstants.isGroupOpaque(view.getAllAttributes()))
installAttributes(view);
else
resetAttributes();
return this;
}
return null;
}
示例4: getRendererComponent
import org.jgraph.JGraph; //导入方法依赖的package包/类
public Component getRendererComponent(JGraph graph, CellView view,
boolean sel, boolean focus, boolean preview) {
gridColor = graph.getGridColor();
highlightColor = graph.getHighlightColor();
lockedHandleColor = graph.getLockedHandleColor();
isDoubleBuffered = graph.isDoubleBuffered();
if (view instanceof VertexView) {
this.view = (VertexView) view;
setComponentOrientation(graph.getComponentOrientation());
if (graph.getEditingCell() != view.getCell()) {
Object label = graph.convertValueToString(view);
if (label != null)
setText("<html><center><font size='3'>"+label.toString()+"</font></center></html>");
else
setText(null);
} else
setText(null);
this.hasFocus = focus;
this.childrenSelected = graph.getSelectionModel()
.isChildrenSelected(view.getCell());
this.selected = sel;
this.preview = preview;
if (this.view.isLeaf()
|| GraphConstants.isGroupOpaque(view.getAllAttributes()))
installAttributes(view);
else
resetAttributes();
return this;
}
return null;
}
示例5: getRendererComponent
import org.jgraph.JGraph; //导入方法依赖的package包/类
public Component getRendererComponent(JGraph graph, CellView view,
boolean sel, boolean focus, boolean preview) {
gridColor = graph.getGridColor();
highlightColor = graph.getHighlightColor();
lockedHandleColor = graph.getLockedHandleColor();
isDoubleBuffered = graph.isDoubleBuffered();
if (view instanceof VertexView) {
this.view = (VertexView) view;
setComponentOrientation(graph.getComponentOrientation());
if (graph.getEditingCell() != view.getCell()) {
Object label = graph.convertValueToString(view);
if (label != null)
setText("<html><font size='4'><b>"+label.toString()+"</b></font></html>");
else
setText("");
} else
setText("");
this.hasFocus = focus;
this.childrenSelected = graph.getSelectionModel()
.isChildrenSelected(view.getCell());
this.selected = sel;
this.preview = preview;
if (this.view.isLeaf()
|| GraphConstants.isGroupOpaque(view.getAllAttributes()))
installAttributes(view);
else
resetAttributes();
return this;
}
return null;
}
示例6: getRendererComponent
import org.jgraph.JGraph; //导入方法依赖的package包/类
public Component getRendererComponent(JGraph graph, CellView view,
boolean sel, boolean focus, boolean preview) {
gridColor = graph.getGridColor();
highlightColor = graph.getHighlightColor();
lockedHandleColor = graph.getLockedHandleColor();
isDoubleBuffered = graph.isDoubleBuffered();
if (view instanceof VertexView) {
this.view = (VertexView) view;
setComponentOrientation(graph.getComponentOrientation());
if (graph.getEditingCell() != view.getCell()) {
Object label = graph.convertValueToString(view);
if (label != null)
setText("<html><font size='3'><b>"+label.toString()+"</b></font></html>");
else
setText("");
} else
setText("");
this.hasFocus = focus;
this.childrenSelected = graph.getSelectionModel()
.isChildrenSelected(view.getCell());
this.selected = sel;
this.preview = preview;
if (this.view.isLeaf()
|| GraphConstants.isGroupOpaque(view.getAllAttributes()))
installAttributes(view);
else
resetAttributes();
return this;
}
return null;
}
示例7: getRendererComponent
import org.jgraph.JGraph; //导入方法依赖的package包/类
public JComponent getRendererComponent(JGraph graph, CellView view, boolean sel, boolean focus, boolean preview)
{
this.graph = graph;
this.isDoubleBuffered = graph.isDoubleBuffered();
this.hasFocus = focus;
this.childrenSelected = graph.getSelectionModel().isChildrenSelected(view.getCell());
this.selected = sel;
this.preview = preview;
// Log.logInfo(this, "view of type '" + view.getClass().getName() + "'");
if (view instanceof VertexView)
{
this.view = (VertexView) view;
setComponentOrientation(graph.getComponentOrientation());
installAttributes(view);
Object obj = view.getCell();
if(obj instanceof FunctionBoxCell)
{
JPanel mainPanel = new JPanel(new BorderLayout(GAP_INTERVAL, GAP_INTERVAL));
if(selected)
{
mainPanel.setBackground(titleSelectedBackgroundColor);
}
else
{
mainPanel.setBackground(titleBackgroundColor);
}
FunctionBoxCell functionCell = (FunctionBoxCell) obj;
Object userObj = functionCell.getUserObject();
if(!(userObj instanceof FunctionBoxMutableViewInterface))
{
System.err.println("User Object of FunctionBoxCell is not of type '" + FunctionBoxMutableViewInterface.class.getName() + "'");
return null;
}
FunctionBoxMutableViewInterface function = (FunctionBoxMutableViewInterface) userObj;
//set up the function title
String functionName = function.getName();
// Log.logInfo(this, "Function Name in FunctionBoxCellRenderer.getRendererComponent(): '" + functionName + "'");
JLabel label = new JLabel();
label.setBorder(getDefaultBorder(1, 0, 0, 0));
label.setBackground(titleBackgroundColor);
label.setText(functionName);
label.setIcon(imageIcon);
mainPanel.add(label, BorderLayout.NORTH);
if(function.getFunctionConstant()!=null)
{
return renderConstantFunction(function, mainPanel);
}
else if(function.getFunctionVocabularyMapping()!=null)
{
return renderVocabularyMappingFunction((function), mainPanel);
}
else
{
return renderNormalFunction(function, mainPanel);
}
}
}
return this;
}
示例8: getRendererComponent
import org.jgraph.JGraph; //导入方法依赖的package包/类
public JComponent getRendererComponent(JGraph graph, CellView view, boolean sel, boolean focus, boolean preview)
{
this.graph = graph;
this.isDoubleBuffered = graph.isDoubleBuffered();
this.hasFocus = focus;
this.childrenSelected = graph.getSelectionModel().isChildrenSelected(view.getCell());
this.selected = sel;
this.preview = preview;
// Log.logInfo(this, "view of type '" + view.getClass().getName() + "'");
if (view instanceof VertexView)
{
this.view = (VertexView) view;
setComponentOrientation(graph.getComponentOrientation());
installAttributes(view);
Object obj = view.getCell();
if(obj instanceof FunctionBoxGraphCell)
{
JPanel mainPanel = new JPanel(new BorderLayout(GAP_INTERVAL, GAP_INTERVAL));
if(selected)
{
mainPanel.setBackground(titleSelectedBackgroundColor);
}
else
{
mainPanel.setBackground(titleBackgroundColor);
}
FunctionBoxGraphCell functionCell = (FunctionBoxGraphCell) obj;
//set up the function title
String functionName = functionCell.getFunctionDef().getName().toString();
JLabel label = new JLabel();
label.setBorder(getDefaultBorder(1, 0, 0, 0));
label.setBackground(titleBackgroundColor);
label.setText(functionName);
label.setIcon(imageIcon);
mainPanel.add(label, BorderLayout.NORTH);
if (functionCell.getInputElements().isEmpty())
return renderFunctionWithoutInputPort(functionCell, mainPanel);
return renderNormalFunction(functionCell, mainPanel);
}
}
return this;
}