• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Main repository of MikuMikuStudio


Commit MetaInfo

Revisión432bae952a3b012806c36ebb7af99873f9c07254 (tree)
Tiempo2013-06-30 03:53:50
Autornormen667 <normen667@75d0...>
Commiternormen667

Log Message

SDK:
- commit ExceptionPanel code

git-svn-id: http://jmonkeyengine.googlecode.com/svn/trunk@10686 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

Cambiar Resumen

Diferencia incremental

--- a/sdk/jme3-core/src/com/jme3/gde/core/errorreport/Bundle.properties
+++ b/sdk/jme3-core/src/com/jme3/gde/core/errorreport/Bundle.properties
@@ -1 +1,3 @@
11 CTL_RendererInfoAction=Check Graphics Capabilities
2+ExceptionPanel.jButton1.text=Copy to clipboard
3+ExceptionPanel.jButton2.text=OK
--- /dev/null
+++ b/sdk/jme3-core/src/com/jme3/gde/core/errorreport/ExceptionPanel.form
@@ -0,0 +1,86 @@
1+<?xml version="1.0" encoding="UTF-8" ?>
2+
3+<Form version="1.4" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
4+ <AuxValues>
5+ <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
6+ <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
7+ <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
8+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
9+ <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
10+ <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
11+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
12+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
13+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
14+ </AuxValues>
15+
16+ <Layout>
17+ <DimensionLayout dim="0">
18+ <Group type="103" groupAlignment="0" attributes="0">
19+ <Group type="102" attributes="0">
20+ <EmptySpace max="-2" attributes="0"/>
21+ <Group type="103" groupAlignment="0" attributes="0">
22+ <Component id="jScrollPane1" pref="388" max="32767" attributes="0"/>
23+ <Group type="102" attributes="0">
24+ <Component id="jButton1" min="-2" max="-2" attributes="0"/>
25+ <EmptySpace max="32767" attributes="0"/>
26+ <Component id="jButton2" min="-2" max="-2" attributes="0"/>
27+ </Group>
28+ </Group>
29+ <EmptySpace max="-2" attributes="0"/>
30+ </Group>
31+ </Group>
32+ </DimensionLayout>
33+ <DimensionLayout dim="1">
34+ <Group type="103" groupAlignment="0" attributes="0">
35+ <Group type="102" alignment="0" attributes="0">
36+ <EmptySpace max="-2" attributes="0"/>
37+ <Component id="jScrollPane1" min="-2" pref="248" max="-2" attributes="0"/>
38+ <EmptySpace pref="11" max="32767" attributes="0"/>
39+ <Group type="103" groupAlignment="3" attributes="0">
40+ <Component id="jButton1" alignment="3" min="-2" max="-2" attributes="0"/>
41+ <Component id="jButton2" alignment="3" min="-2" max="-2" attributes="0"/>
42+ </Group>
43+ <EmptySpace max="-2" attributes="0"/>
44+ </Group>
45+ </Group>
46+ </DimensionLayout>
47+ </Layout>
48+ <SubComponents>
49+ <Container class="javax.swing.JScrollPane" name="jScrollPane1">
50+ <AuxValues>
51+ <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
52+ </AuxValues>
53+
54+ <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
55+ <SubComponents>
56+ <Component class="javax.swing.JTextArea" name="jTextArea1">
57+ <Properties>
58+ <Property name="editable" type="boolean" value="false"/>
59+ <Property name="columns" type="int" value="20"/>
60+ <Property name="rows" type="int" value="5"/>
61+ <Property name="disabledTextColor" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
62+ <Color blue="0" green="0" red="0" type="rgb"/>
63+ </Property>
64+ </Properties>
65+ </Component>
66+ </SubComponents>
67+ </Container>
68+ <Component class="javax.swing.JButton" name="jButton1">
69+ <Properties>
70+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
71+ <ResourceString bundle="com/jme3/gde/core/errorreport/Bundle.properties" key="ExceptionPanel.jButton1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
72+ </Property>
73+ </Properties>
74+ <Events>
75+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
76+ </Events>
77+ </Component>
78+ <Component class="javax.swing.JButton" name="jButton2">
79+ <Properties>
80+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
81+ <ResourceString bundle="com/jme3/gde/core/errorreport/Bundle.properties" key="ExceptionPanel.jButton2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
82+ </Property>
83+ </Properties>
84+ </Component>
85+ </SubComponents>
86+</Form>
--- /dev/null
+++ b/sdk/jme3-core/src/com/jme3/gde/core/errorreport/ExceptionPanel.java
@@ -0,0 +1,133 @@
1+/*
2+ * Copyright (c) 2003-2012 jMonkeyEngine
3+ * All rights reserved.
4+ *
5+ * Redistribution and use in source and binary forms, with or without
6+ * modification, are permitted provided that the following conditions are
7+ * met:
8+ *
9+ * * Redistributions of source code must retain the above copyright
10+ * notice, this list of conditions and the following disclaimer.
11+ *
12+ * * Redistributions in binary form must reproduce the above copyright
13+ * notice, this list of conditions and the following disclaimer in the
14+ * documentation and/or other materials provided with the distribution.
15+ *
16+ * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
17+ * may be used to endorse or promote products derived from this software
18+ * without specific prior written permission.
19+ *
20+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31+ */
32+package com.jme3.gde.core.errorreport;
33+
34+import java.awt.Toolkit;
35+import java.awt.datatransfer.Clipboard;
36+import java.awt.datatransfer.StringSelection;
37+
38+/**
39+ *
40+ * @author normenhansen
41+ */
42+public final class ExceptionPanel extends javax.swing.JPanel {
43+
44+ /**
45+ * Creates new form ExceptionPanel
46+ */
47+ public ExceptionPanel() {
48+ initComponents();
49+ }
50+
51+ public ExceptionPanel(String text) {
52+ initComponents();
53+ setText(text);
54+ }
55+
56+ public void setText(String text) {
57+ jTextArea1.setText(text);
58+ }
59+
60+ private void copyToClip(String text) {
61+ Toolkit toolkit = Toolkit.getDefaultToolkit();
62+ Clipboard clipboard = toolkit.getSystemClipboard();
63+ StringSelection strSel = new StringSelection(text);
64+ clipboard.setContents(strSel, null);
65+ }
66+
67+ /**
68+ * This method is called from within the constructor to initialize the form.
69+ * WARNING: Do NOT modify this code. The content of this method is always
70+ * regenerated by the Form Editor.
71+ */
72+ @SuppressWarnings("unchecked")
73+ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
74+ private void initComponents() {
75+
76+ jScrollPane1 = new javax.swing.JScrollPane();
77+ jTextArea1 = new javax.swing.JTextArea();
78+ jButton1 = new javax.swing.JButton();
79+ jButton2 = new javax.swing.JButton();
80+
81+ jTextArea1.setEditable(false);
82+ jTextArea1.setColumns(20);
83+ jTextArea1.setRows(5);
84+ jTextArea1.setDisabledTextColor(new java.awt.Color(0, 0, 0));
85+ jScrollPane1.setViewportView(jTextArea1);
86+
87+ org.openide.awt.Mnemonics.setLocalizedText(jButton1, org.openide.util.NbBundle.getMessage(ExceptionPanel.class, "ExceptionPanel.jButton1.text")); // NOI18N
88+ jButton1.addActionListener(new java.awt.event.ActionListener() {
89+ public void actionPerformed(java.awt.event.ActionEvent evt) {
90+ jButton1ActionPerformed(evt);
91+ }
92+ });
93+
94+ org.openide.awt.Mnemonics.setLocalizedText(jButton2, org.openide.util.NbBundle.getMessage(ExceptionPanel.class, "ExceptionPanel.jButton2.text")); // NOI18N
95+
96+ org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
97+ this.setLayout(layout);
98+ layout.setHorizontalGroup(
99+ layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
100+ .add(layout.createSequentialGroup()
101+ .addContainerGap()
102+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
103+ .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 388, Short.MAX_VALUE)
104+ .add(layout.createSequentialGroup()
105+ .add(jButton1)
106+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
107+ .add(jButton2)))
108+ .addContainerGap())
109+ );
110+ layout.setVerticalGroup(
111+ layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
112+ .add(layout.createSequentialGroup()
113+ .addContainerGap()
114+ .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 248, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
115+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 11, Short.MAX_VALUE)
116+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
117+ .add(jButton1)
118+ .add(jButton2))
119+ .addContainerGap())
120+ );
121+ }// </editor-fold>//GEN-END:initComponents
122+
123+ private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
124+ copyToClip(jTextArea1.getText());
125+ }//GEN-LAST:event_jButton1ActionPerformed
126+
127+ // Variables declaration - do not modify//GEN-BEGIN:variables
128+ private javax.swing.JButton jButton1;
129+ private javax.swing.JButton jButton2;
130+ private javax.swing.JScrollPane jScrollPane1;
131+ private javax.swing.JTextArea jTextArea1;
132+ // End of variables declaration//GEN-END:variables
133+}