User Tools

Site Tools


doc:en:appendixc

This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

====== Developpers' guide ====== If you know how to program in Java, you can use JSesh as a library for your own programs. ===== How to ===== ==== Adding a hieroglyphic edition field in a SWING interface ==== Actually, this is quite easy to do. You need to have jsesh.jar in your classpath, and probably jseshGlyphs.jar too if you want the full fonts. Then, having a hieroglyphic field in your application is as easy as: <code java> // The package may change one day in the (far) future. import package jsesh.mdcDisplayer.swing.editor.*; public MyClass .... { void buildInterface() { // A large editor, better placed in a JScrollPane JMDCEditor editor= new JMDCEditor(); // A TextField-like editor JMDCField mdcField= new JMDCField(); } } </code> Now, you can manipulate the text directly through the HieroglyphicTextModel class, which represents the text as a list of objects, or, if you need only simple functionalities, use the methods ''setMDCText(String mdc)'' and getMDCText() to set and retrieve the content of the field as "Manuel de codage". You can forbid the editing of the text with "''setEditable(false)''" One thing which is currently missing from the libraries (but which should be fixed soon) is a way to easily direct the information from the palette to various JSesh widgets (it can be done with the overall structure, but it's not automatic at all).

doc/en/appendixc.1360153759.txt.gz · Last modified: 2016/10/12 14:14 (external edit)