-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3794 from thelsing/feature-htmltokennotes
Feature htmltokennotes
- Loading branch information
Showing
9 changed files
with
1,061 additions
and
565 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
src/main/java/net/rptools/maptool/client/swing/htmleditorsplit/HtmlEditorSplit.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* This software Copyright by the RPTools.net development team, and | ||
* licensed under the Affero GPL Version 3 or, at your option, any later | ||
* version. | ||
* | ||
* MapTool Source Code is distributed in the hope that it will be | ||
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty | ||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* | ||
* You should have received a copy of the GNU Affero General Public | ||
* License * along with this source Code. If not, please visit | ||
* <http://www.gnu.org/licenses/> and specifically the Affero license | ||
* text at <http://www.gnu.org/licenses/agpl.html>. | ||
*/ | ||
package net.rptools.maptool.client.swing.htmleditorsplit; | ||
|
||
import com.intellij.uiDesigner.core.GridConstraints; | ||
import com.intellij.uiDesigner.core.GridLayoutManager; | ||
import java.awt.*; | ||
import java.beans.JavaBean; | ||
import javax.swing.*; | ||
|
||
@JavaBean(defaultProperty = "UI", description = "HTML-Editor that also displays sourcecode") | ||
public class HtmlEditorSplit extends JPanel { | ||
private HtmlEditorSplitGui gui = new HtmlEditorSplitGui(); | ||
|
||
public HtmlEditorSplit() { | ||
setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); | ||
add( | ||
gui.$$$getRootComponent$$$(), | ||
new GridConstraints( | ||
0, | ||
0, | ||
1, | ||
1, | ||
GridConstraints.ANCHOR_CENTER, | ||
GridConstraints.FILL_BOTH, | ||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, | ||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, | ||
null, | ||
null, | ||
null, | ||
0, | ||
false)); | ||
} | ||
|
||
public String getText() { | ||
return gui.getText(); | ||
} | ||
|
||
public void setText(String text) { | ||
gui.setText(text); | ||
} | ||
|
||
public String getSelectedText() { | ||
return gui.getSelectedText(); | ||
} | ||
|
||
@Override | ||
public void setEnabled(boolean enabled) { | ||
super.setEnabled(enabled); | ||
gui.setEnabled(enabled); | ||
} | ||
} |
92 changes: 92 additions & 0 deletions
92
src/main/java/net/rptools/maptool/client/swing/htmleditorsplit/HtmlEditorSplitGui.form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="net.rptools.maptool.client.swing.htmleditorsplit.HtmlEditorSplitGui"> | ||
<grid id="27dc6" binding="rootPanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> | ||
<margin top="0" left="0" bottom="0" right="0"/> | ||
<constraints> | ||
<xy x="20" y="20" width="500" height="400"/> | ||
</constraints> | ||
<properties/> | ||
<border type="none"/> | ||
<children> | ||
<tabbedpane id="297f1" binding="tabPanel"> | ||
<constraints> | ||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"> | ||
<preferred-size width="200" height="200"/> | ||
</grid> | ||
</constraints> | ||
<properties> | ||
<name value=""/> | ||
<tabPlacement value="3"/> | ||
</properties> | ||
<border type="none"/> | ||
<children> | ||
<grid id="d2e47" binding="htmlTab" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> | ||
<margin top="2" left="2" bottom="6" right="2"/> | ||
<constraints> | ||
<tabbedpane title-resource-bundle="net/rptools/maptool/language/i18n" title-key="EditTokenDialog.tab.hero.html"/> | ||
</constraints> | ||
<properties> | ||
<name value=""/> | ||
</properties> | ||
<border type="none"/> | ||
<children> | ||
<component id="fe9a4" class="javafx.embed.swing.JFXPanel" binding="jfxPanel"> | ||
<constraints> | ||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/> | ||
</constraints> | ||
<properties/> | ||
</component> | ||
</children> | ||
</grid> | ||
<grid id="2ed87" binding="textTab" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> | ||
<margin top="0" left="0" bottom="4" right="0"/> | ||
<constraints> | ||
<tabbedpane title-resource-bundle="net/rptools/maptool/language/i18n" title-key="EditTokenDialog.tab.hero.text"/> | ||
</constraints> | ||
<properties> | ||
<name value=""/> | ||
</properties> | ||
<border type="none"/> | ||
<children> | ||
<grid id="1396b" class="org.fife.rsta.ui.CollapsibleSectionPanel" binding="sectionPanel" layout-manager="BorderLayout" hgap="0" vgap="0"> | ||
<constraints> | ||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/> | ||
</constraints> | ||
<properties> | ||
<name value=""/> | ||
</properties> | ||
<border type="none"/> | ||
<children> | ||
<scrollpane id="be0cb" class="org.fife.ui.rtextarea.RTextScrollPane" binding="textScrollPane"> | ||
<constraints border-constraint="Center"/> | ||
<properties> | ||
<foldIndicatorEnabled value="true"/> | ||
<iconRowHeaderEnabled value="true"/> | ||
<lineNumbersEnabled value="true"/> | ||
</properties> | ||
<border type="none"/> | ||
<children> | ||
<component id="d7e53" class="org.fife.ui.rsyntaxtextarea.RSyntaxTextArea" binding="sourceTextArea"> | ||
<constraints/> | ||
<properties> | ||
<codeFoldingEnabled value="true"/> | ||
<lineWrap value="true"/> | ||
<markOccurrences value="true"/> | ||
<name value=""/> | ||
<selectionEnd value="0"/> | ||
<selectionStart value="0"/> | ||
<syntaxEditingStyle value="text/html"/> | ||
<text value=""/> | ||
</properties> | ||
</component> | ||
</children> | ||
</scrollpane> | ||
</children> | ||
</grid> | ||
</children> | ||
</grid> | ||
</children> | ||
</tabbedpane> | ||
</children> | ||
</grid> | ||
</form> |
Oops, something went wrong.