Commit 77e76fad authored by Krzysztof Nowinski's avatar Krzysztof Nowinski

2d glyphs default

parent 1853822a
......@@ -215,6 +215,7 @@
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
<ComponentRef name="buttonGroup1"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="2D texts"/>
</Properties>
<Events>
......@@ -226,7 +227,6 @@
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
<ComponentRef name="buttonGroup1"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="3D texts"/>
</Properties>
<Events>
......
......@@ -56,9 +56,8 @@ import pl.edu.icm.visnow.system.main.VisNow;
public class FontGUI extends javax.swing.JPanel
{
FontParams params = new FontParams();
FontParams params;
protected String fontList;
protected ComponentColorMap brightnessMap = new ComponentColorMap();
/**
......@@ -79,11 +78,6 @@ public class FontGUI extends javax.swing.JPanel
text2DGUI.setParams(params);
}
public void setInitType(boolean threeDim)
{
glyph3DButton.setSelected(threeDim);
}
public void setInitBrightness(float v)
{
// map.setMapIndex(ColorMapManager.COLORMAP1D_RGB);
......@@ -275,6 +269,7 @@ public class FontGUI extends javax.swing.JPanel
jPanel2.setLayout(new java.awt.GridLayout(1, 0));
buttonGroup1.add(glyph2DButton);
glyph2DButton.setSelected(true);
glyph2DButton.setText("2D texts");
glyph2DButton.addActionListener(new java.awt.event.ActionListener()
{
......@@ -286,7 +281,6 @@ public class FontGUI extends javax.swing.JPanel
jPanel2.add(glyph2DButton);
buttonGroup1.add(glyph3DButton);
glyph3DButton.setSelected(true);
glyph3DButton.setText("3D texts");
glyph3DButton.addActionListener(new java.awt.event.ActionListener()
{
......@@ -357,11 +351,13 @@ public class FontGUI extends javax.swing.JPanel
private void glyph2DButtonActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_glyph2DButtonActionPerformed
{//GEN-HEADEREND:event_glyph2DButtonActionPerformed
params.setThreeDimensional(glyph3DButton.isSelected());
text2DGUI.setVisible(!glyph3DButton.isSelected());
}//GEN-LAST:event_glyph2DButtonActionPerformed
private void glyph3DButtonActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_glyph3DButtonActionPerformed
{//GEN-HEADEREND:event_glyph3DButtonActionPerformed
params.setThreeDimensional(glyph3DButton.isSelected());
text2DGUI.setVisible(glyph2DButton.isSelected());
}//GEN-LAST:event_glyph3DButtonActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
......
......@@ -218,6 +218,13 @@ public class Text2DGUI extends javax.swing.JPanel
public void setParams( FontParams params)
{
this.params = params;
boolean act = params.isActive();
params.setActive(false);
positionCombo.setSelectedItem(params.getPosition());
decorationCombo.setSelectedItem(params.getDecoration());
shiftSlider.setVal(params.getShift());
opacitySlider.setVal(params.getOpacity());
params.setActive(act);
}
......
......@@ -37,8 +37,6 @@
package pl.edu.icm.visnow.lib.basic.mappers.TextGlyphs;
import java.util.Arrays;
import java.util.Hashtable;
import javax.swing.JLabel;
import pl.edu.icm.jscic.Field;
import pl.edu.icm.jscic.RegularField;
import pl.edu.icm.jscic.dataarrays.DataArray;
......@@ -55,7 +53,6 @@ public class GUI extends javax.swing.JPanel
private Params params = new Params();
private Field inField = null;
private Hashtable<Integer, JLabel> downLabels = new Hashtable<Integer, JLabel>();
private String floatFormat = "%4.1f", intFormat = "%3d";
private String format = floatFormat;
......@@ -206,7 +203,6 @@ public class GUI extends javax.swing.JPanel
//TODO: call updateUI from or other method dedicated to update UI (like after loading network from vna)
formatField.setText(params.getFormat());
mapComboBox.setTitle("glyph size component");
fontGUI.setInitType(true);
}
private void updateUI(DataArray da)
......
......@@ -71,8 +71,7 @@ public class Params extends Parameters
{
super(eggs);
setValue("lowCrop", new int[]{0, 0, 0});
setValue("upCrop", new int[]{1, 1, 1});
fontParams.setThreeDimensional(true);
setValue("upCrop", new int[]{1, 1, 1});
threshold.addChangeListener(new ChangeListener()
{
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment