本文整理汇总了Java中org.tigris.gef.base.Globals类的典型用法代码示例。如果您正苦于以下问题:Java Globals类的具体用法?Java Globals怎么用?Java Globals使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Globals类属于org.tigris.gef.base包,在下文中一共展示了Globals类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: UMLViewer
import org.tigris.gef.base.Globals; //导入依赖的package包/类
public UMLViewer(UMLDiagram d) {
super(d.diagram);
this.diagram = d;
pagerButton = new PagerButton(diagram);
this.getScrollPane().setCorner(JScrollPane.LOWER_RIGHT_CORNER, pagerButton);
// this will make sure that the pager scrolls with the scrollbars
this.getScrollPane().getViewport().addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
pager.updateScroller();
pager.repaint();
}
});
this.addComponentListener(new UMLViewerComponentListener());
this.addKeyListener(new UMLViewerKeyListener(this));
this.addMouseListener(new UMLViewerMouseListener(this));
this.addMouseMotionListener(new UMLViewerMouseMotionListener(this));
this.pager = new Pager(this.diagram);
this.pagerCaptionBar = new PagerCaptionBar(this.pager);
this.setDrawingSize(1500, 1000);
Globals.setShowFigTips(false);
}
示例2: popClassifier
import org.tigris.gef.base.Globals; //导入依赖的package包/类
/**
Called from the parser when a classifier is completely parsed.
*/
public void popClassifier() {
// now create diagram if it doesn't exists in project
if (importSession != null && importSession.isCreateDiagramsChecked()) {
if (getDiagram() == null) {
diagram = new DiagramInterface(Globals.curEditor());
if (currentPackageName != null
&& !currentPackageName.trim().equals("")) {
// create new diagram or select existing diagram for package
diagram.createOrSelectClassDiagram(currentPackage,
currentPackageName);
} else {
// create new diagram in root for classifier without package
diagram.createRootClassDiagram();
}
} else {
if (currentPackageName != null) {
getDiagram().selectClassDiagram(currentPackage,
currentPackageName);
}
// the DiagramInterface is instantiated already
// but the class is in a source file
// with no package declaration
else {
// create new diagram in root for classifier without package
diagram.createRootClassDiagram();
}
}
}
// add the current classifier to the diagram.
Object classifier = parseState.getClassifier();
if (Model.getFacade().isAInterface(classifier)) {
if (getDiagram() != null && importSession != null
&& importSession.isCreateDiagramsChecked()) {
diagram.addInterface(classifier,
importSession.isMinimiseFigsChecked());
}
} else {
if (Model.getFacade().isAClass(classifier)) {
if (getDiagram() != null && importSession != null
&& importSession.isCreateDiagramsChecked()) {
diagram.addClass(classifier,
importSession.isMinimiseFigsChecked());
}
}
}
// Remove operations and attributes not in source
parseState.removeObsoleteFeatures();
// Remove inner classes not in source
parseState.removeObsoleteInnerClasses();
parseState = (ParseState) parseStateStack.pop();
}