📄 concepttypesframe.java
字号:
package toocom.ui;
import javax.swing.*;
import java.awt.*;
import toocom.ocgl.*;
import toocom.graphdrawing.*;
/**
* This class represents the graphical window used for building the axioms.
* It provides creation and structuration fonctions by using its own toolbar or right
* mouse click.
*
* @author Fr閐閞ic F黵st
*/
public class ConceptTypesFrame extends JPanel {
private MainFrame mf;
private ConceptTypesToolBar cttb;
private ConceptTypesPanel ctp;
public void setConceptTypeMode(int mode){
ctp.setConceptTypeMode(mode);
}
public void clear() {
ctp.clear();
}
/** Run the tree drawing algorithm */
public void refreshTree(){
Ontology o = mf.getOntology();
if(o != null){
Graphics g = this.getGraphics();
TreeDrawing td = new TreeDrawing(g, o.getConceptTypes(), mf.getOntologyLanguage());
ctp.setPreferredSize(td.getDisplayArea());
ctp.revalidate();
repaint();
}
}
public ConceptTypesFrame(MainFrame mf){
super();
this.mf = mf;
this.setLayout(new BorderLayout());
//Create the tool bar panel
cttb = new ConceptTypesToolBar(this);
ctp = new ConceptTypesPanel(mf);
JScrollPane sp = new JScrollPane(ctp);
sp.setWheelScrollingEnabled(true);
this.add(cttb, BorderLayout.NORTH);
this.add(sp, BorderLayout.CENTER);
cttb.setEnabled(true);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -