-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGUIQuery.java
More file actions
47 lines (45 loc) · 1.03 KB
/
GUIQuery.java
File metadata and controls
47 lines (45 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/**
*@file GUIQuery.java
*This file contains GUI Query
*@author Abhinav Khattar 2015120
*@author Tushar Arora 2015107
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.text.*;
import javax.swing.border.Border;
import javax.swing.table.DefaultTableModel;
import javax.xml.parsers.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
/**Provides Template Design Pattern*/
public abstract class GUIQuery
{
protected JFrame mainFrame;
protected JPanel upperPanel;
protected JPanel sidePanel;
protected JPanel displayPanel;
protected JComboBox<String> queries;
protected JButton submit,reset;
protected QueryFacade q=null;
public abstract void initQuery();
public abstract void setQuery();
public final void start()
{
initQuery();
setQuery();
}
public boolean isInteger(String s) {
boolean isValidInteger = false;
try
{
Integer.parseInt(s);
isValidInteger = true;
}
catch (NumberFormatException ex)
{}
return isValidInteger;
}
}