Skip to content

Commit

Permalink
- NEW: Added Features table filtering by coverage. Refs #10.
Browse files Browse the repository at this point in the history
  • Loading branch information
imilne committed Oct 14, 2020
1 parent ffb84b2 commit 19681d1
Show file tree
Hide file tree
Showing 3 changed files with 145 additions and 129 deletions.
4 changes: 3 additions & 1 deletion res/text/tablet.properties
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ gui.FeaturesTableModel.col1 = Type
gui.FeaturesTableModel.col2 = Name
gui.FeaturesTableModel.col3 = Start
gui.FeaturesTableModel.col4 = End
gui.FeaturesTableModel.col4 = Coverage
gui.FeaturesTableModel.col5 = Coverage

gui.FindPanel.guiWarnSearchLimitExceeded = For the sake of performance, Tablet \
stops searching after {0} matches have been found.
Expand Down Expand Up @@ -224,6 +224,8 @@ gui.NBFeaturesPanelControls.combo2 = Min start position
gui.NBFeaturesPanelControls.combo3 = Max start position
gui.NBFeaturesPanelControls.combo4 = Min end position
gui.NBFeaturesPanelControls.combo5 = Max end position
gui.NBFeaturesPanelControls.combo6 = Min coverage
gui.NBFeaturesPanelControls.combo7 = Max coverage
gui.NBFeaturesPanelControls.linkEdit = Select tracks
gui.NBFeaturesPanelControls.checkPadded = Feature values are padded
gui.NBFeaturesPanelControls.checkPaddedTooltip = Select to use (and jump to) \
Expand Down
254 changes: 127 additions & 127 deletions src/tablet/gui/FeaturesPanelNB.form
Original file line number Diff line number Diff line change
@@ -1,127 +1,127 @@
<?xml version="1.0" encoding="UTF-8" ?>

<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>

<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollPane1" alignment="1" pref="340" max="32767" attributes="0"/>
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="featuresLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="195" max="32767" attributes="0"/>
<Component id="linkEdit" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Component id="filterLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="combo" pref="273" max="32767" attributes="0"/>
</Group>
<Component id="textField" alignment="0" pref="320" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="checkPadded" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="featuresLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="linkEdit" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="jScrollPane1" pref="57" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="combo" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="filterLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="textField" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="checkPadded" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JCheckBox" name="checkPadded">
<Properties>
<Property name="text" type="java.lang.String" value="Feature values are padded"/>
</Properties>
</Component>
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
</AuxValues>

<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JTable" name="table">
<Properties>
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
<Table columnCount="0" rowCount="0"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new JTable() {&#xd;&#xa;&#x9;public String getToolTipText(MouseEvent e) {&#xd;&#xa;&#x9;&#x9;return panel.getTableToolTip(e);&#xd;&#xa; }&#xd;&#xa;}"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/>
</AuxValues>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JLabel" name="featuresLabel">
<Properties>
<Property name="text" type="java.lang.String" value="Features (0):"/>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/>
</AuxValues>
</Component>
<Component class="scri.commons.gui.matisse.HyperLinkLabel" name="linkEdit">
<Properties>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="9c" green="6a" red="44" type="rgb"/>
</Property>
<Property name="text" type="java.lang.String" value="Select tracks"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="filterLabel">
<Properties>
<Property name="text" type="java.lang.String" value="Filter by:"/>
</Properties>
</Component>
<Component class="javax.swing.JComboBox" name="combo">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="0"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;String&gt;"/>
</AuxValues>
</Component>
<Component class="javax.swing.JTextField" name="textField">
</Component>
</SubComponents>
</Form>
<?xml version="1.0" encoding="UTF-8" ?>

<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>

<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollPane1" alignment="1" pref="340" max="32767" attributes="0"/>
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="featuresLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="195" max="32767" attributes="0"/>
<Component id="linkEdit" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Component id="filterLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="combo" pref="273" max="32767" attributes="0"/>
</Group>
<Component id="textField" alignment="0" pref="320" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="checkPadded" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="featuresLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="linkEdit" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="jScrollPane1" pref="57" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="combo" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="filterLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="textField" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="checkPadded" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JCheckBox" name="checkPadded">
<Properties>
<Property name="text" type="java.lang.String" value="Feature values are padded"/>
</Properties>
</Component>
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
</AuxValues>

<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JTable" name="table">
<Properties>
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
<Table columnCount="0" rowCount="0"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new JTable() {&#xd;&#xa;&#x9;public String getToolTipText(MouseEvent e) {&#xd;&#xa;&#x9;&#x9;return panel.getTableToolTip(e);&#xd;&#xa; }&#xd;&#xa;}"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/>
</AuxValues>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JLabel" name="featuresLabel">
<Properties>
<Property name="text" type="java.lang.String" value="Features (0):"/>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/>
</AuxValues>
</Component>
<Component class="scri.commons.gui.matisse.HyperLinkLabel" name="linkEdit">
<Properties>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="9c" green="6a" red="44" type="rgb"/>
</Property>
<Property name="text" type="java.lang.String" value="Select tracks"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="filterLabel">
<Properties>
<Property name="text" type="java.lang.String" value="Filter by:"/>
</Properties>
</Component>
<Component class="javax.swing.JComboBox" name="combo">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="0"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;String&gt;"/>
</AuxValues>
</Component>
<Component class="javax.swing.JTextField" name="textField">
</Component>
</SubComponents>
</Form>
16 changes: 15 additions & 1 deletion src/tablet/gui/FeaturesPanelNB.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public FeaturesPanelNB(FeaturesPanel panel)
RB.setText(linkEdit, "gui.NBFeaturesPanelControls.linkEdit");
checkPadded.setToolTipText(RB.getString("gui.NBFeaturesPanelControls.checkPaddedTooltip"));

for (int i = 0; i < 6; i++)
for (int i = 0; i < 8; i++)
combo.addItem(RB.getString("gui.NBFeaturesPanelControls.combo" + i));

combo.setSelectedIndex(Prefs.guiFeaturesFilter);
Expand Down Expand Up @@ -105,6 +105,20 @@ else if (index == 5)
int number = Integer.parseInt(textField.getText());
rf = RowFilter.numberFilter(ComparisonType.BEFORE, number-1, 3);
}

// Min coverage
else if (index == 6)
{
int number = Integer.parseInt(textField.getText());
rf = RowFilter.numberFilter(ComparisonType.AFTER, number-1, 4);
}

// Max coverage
else if (index == 7)
{
int number = Integer.parseInt(textField.getText());
rf = RowFilter.numberFilter(ComparisonType.BEFORE, number-1, 4);
}
}
catch (Exception e)
{
Expand Down

0 comments on commit 19681d1

Please sign in to comment.