id
stringlengths 36
36
| text
stringlengths 1
1.25M
|
---|---|
3f9ce223-c39d-4927-99fb-b719257d943c | public void setId(int id) {
this.id = id;
} |
bb691953-b8f5-4526-b69d-dcc6251c7eca | public int getAccountId() {
return accountId;
} |
9d8e322e-2f03-47a3-be58-4adbd21eec04 | public void setAccountId(int accountId) {
this.accountId = accountId;
} |
dbf0fbce-5fd5-4b15-b8c5-c17fb57129ef | public String getDate() {
return date;
} |
53da75f8-bcd1-48bc-93e6-25d6de78a785 | public void setDate(String date) {
this.date = date;
} |
7b1ec807-2d5f-4421-a7ed-b93a75d58fbe | public String getDescription() {
return description;
} |
a19232e7-a037-4abb-bde2-d043306db74e | public void setDescription(String description) {
this.description = description;
} |
42595dbd-006e-4b22-9059-ac7a88749af6 | public String getType() {
return type;
} |
e424fba6-3ad6-493a-b429-c1db1cda08cc | public void setType(String type) {
this.type = type;
} |
6885c562-3c42-4b06-aa59-e617617b2fca | public String getStatus() {
return status;
} |
a0edc434-412d-4731-8e6a-b502633e70c5 | public void setStatus(String status) {
this.status = status;
} |
f0dfcbd8-fa6f-4bad-ad02-a74c1c4fbd94 | public double getAmount() {
return amount;
} |
231b439c-fac8-4303-a188-484d20083061 | public void setAmount(double amount) {
this.amount = amount;
} |
15d80700-9da3-4058-9620-580d385e97b9 | public double getBalance() {
return balance;
} |
229f021b-4299-4973-bcad-8daa01d7615e | public void setBalance(double balance) {
this.balance = balance;
} |
d64c6aa3-7f49-48d6-a551-485bab645ef5 | Level (int e, PApplet p) {
this.elevation = e;
this.levelWidth = 20 * feet;
parent = p;
} |
d266dde8-af03-489c-8646-f4d72881536d | Level (int e, int w, PApplet p){
this.elevation = e;
this.levelWidth = w;
parent = p;
} |
a6d2e05b-97c9-47b1-b8b0-87c751192d83 | void drawLevel(int i){
drawLevelGraphic(i);
drawLevelData(i);
} |
4abbe403-789d-4249-bb85-0387ab4ef6db | void drawLevelGraphic(int i){
parent.pushMatrix();
parent.translate(0,0,elevation);
parent.noStroke(); // levels are not outlined
parent.fill(250-i*10,0,0,5); // levels are transparent red
parent.rectMode(PApplet.CENTER);
parent.rect(0, 0, levelWidth, levelWidth); //
parent.popMatrix();
} |
92d3dfbb-33c5-4037-9d74-ec89aa7a9037 | void drawLevelData(int i){
drawLevelName(i);
drawLevelHeight(i);
} |
a79af73c-940a-49d2-ad70-539b458e0ab6 | void drawLevelName(int i){
parent.pushMatrix();
parent.translate(levelWidth/2+textMargin , levelWidth/2, elevation);
parent.fill(50, 50, 50, 55);
parent.textSize(40);
parent.text("LEVEL " + i, 0, 0);
parent.popMatrix();
} |
026ec72f-a322-44dd-9a91-e4c427707981 | void drawLevelHeight(int i){
parent.pushMatrix();
parent.translate(levelWidth/2+textMargin , levelWidth/2+levelTextSize, elevation);
parent.fill(50, 50, 50, 95);
parent.textSize(levelTextSize);
parent.text( (int)(elevation/feet) + " ' - " + (int)(elevation%feet) + " ''", 0, 0);
parent.popMatrix();
} |
7fba7a8d-c0ac-4a9f-a95d-d7b4ddafc68a | ColumnGridLine(int num, PApplet p){
parent = p;
dist = num;
name = (Integer.toString(num));
} |
0b00cace-bb97-4bff-94f5-4f0e3b71cfdb | public String getName(){
return name;
} |
986f6d36-2be9-433b-9e2b-029ebe4c29df | void drawGridLine(int w, int d){
parent.pushMatrix();
parent.stroke(150);
parent.translate(-(w/2), 0 , 0);
parent.line(dist, (-length/2)-margin, dist, (length/2)+margin );
//parent.line(dist, (-length/2), dist, (length/2));
parent.fill(50, 50, 50, 155);
parent.textSize(gridTextSize);
//parent.text(name,dist+2,(length/2)+margin);
parent.text(name, dist+2, (length/2)+margin);
parent.popMatrix();
} |
40065925-62d9-415a-a29e-4e245c09869b | public void drawGridLineName(int w, int name){
parent.pushMatrix();
parent.stroke(150);
parent.translate(-(w/2), 0, 0 );
parent.fill(50, 50, 50, 155);
parent.textSize(50);
//parent.text(name+1,dist+2,(-length/2)-margin);
parent.text(name+1,dist+2,(-length/2)-margin);
parent.popMatrix();
} |
df14c7e5-202f-43cb-b4c6-559be52d8b9c | public void drawGridLineLetter(int w, int name){
int newname = name + 65;
parent.pushMatrix();
parent.stroke(150);
parent.translate(-(w/2), 0, 0 );
parent.fill(50, 50, 50, 155);
parent.textSize(50);
//parent.text((char)newname,dist+2,(-length/2)-margin);
parent.text((char)newname, dist+2, (-length/2)-margin);
parent.popMatrix();
} |
30363b02-19fc-493d-9368-687eeaf965c7 | public boolean locked(int x){
if (x==1){
return true;
}else{
return false;
}
} |
20d05b5e-cfd5-40cd-b705-e63b4bcc40fa | public boolean pinned(int x){
if (x==2){
return true;
}else{
return false;
}
} |
8c8fe3cd-042e-441d-9e6a-607fa7ff89f6 | public void drawColumn(int w){
setColors();
parent.pushMatrix();
//parent.translate( -(mySkyscraper.myColumn.w/2), 0, (base.elevation + h/2) ); // CRUD the grid line doesn't know where it is!
parent.translate(-(w/2), 0, 1000); // CRUD the grid line doesn't know where it is!
parent.box(12, 12, 2236); //to be replaced with extruded sketch of profile
parent.popMatrix();
} |
d20f4e87-ca14-426c-9de0-cb3d3a88da32 | void setColors(){
parent.stroke(155); // Floors are outlined
parent.fill(155,155); // levels are transparent grey
} |
d0cdb28b-05fe-463f-adc5-d924c1e5f952 | public LevelStack (int numLevels, int levelWidth, PApplet p ){
parent = p;
myLevels = new ArrayList<Level>();
for (int i=0; i<numLevels; i++){
myLevels.add(new Level(i*typicalLevelHeight, levelWidth, parent) );
}
} |
d5a7e95e-7af3-4ee6-a0ef-b8937c9228fa | public void drawStack(){
for (int i=0; i<myLevels.size(); i++){
lev = (Level) myLevels.get(i);
lev.drawLevel(i);
}
} |
a277fd25-ea68-4a28-ae84-0be67bcf3ee1 | public void addLevel(){
int lastIndex = myLevels.size()-1;
myLevels.add(new Level(lastIndex*typicalLevelHeight, parent));
} |
cca7dbf4-626a-4117-8f6d-7f813eb3cbfd | public void removeLevel(int i){
myLevels.remove(i);
} |
2e60a6be-835a-4400-a9af-0d0ad2670127 | public void flush(){
myLevels.clear();
} |
55f7a6d3-586b-41b0-86d4-a61baa33c6f2 | public void setHeight(int h, int i){
lev = (Level) myLevels.get(i);
lev.elevation = h;
} |
d8af0b8c-3d15-483b-afb3-a2a77f2c1f29 | public void setWidthAll(int w){
for (int i = 0; i < myLevels.size(); i++) {
lev = (Level) myLevels.get(i);
lev.levelWidth = w;
}
} |
3b098875-625b-4870-9797-d950147d564c | public void setup() {
size(1200, 800, OPENGL);
p3 = (PGraphics3D) g;
cam = new PeasyCam(this, 300 * feet);
//cam.setMinimumDistance(2 * feet);
//cam.setMaximumDistance(2000 * feet);
cp5 = new cp5GUI(this);
cp5.inCP5();
cp5.initialize();
System.out.println(cp5.lw + " " + cp5.nl);
mySkyscraper = new Skyscraper(cp5.nl, cp5.lw, this);
} |
832b3e93-661d-4161-a542-55a7137376b7 | public void draw() {
background(250);
//hint(ENABLE_DEPTH_TEST);
pushMatrix();
mySkyscraper.myLevels.drawStack();
popMatrix();
//hint(DISABLE_DEPTH_TEST);
gui();
cam.setActive(true);
if(cp5.cp5.isMouseOver()){
cam.setActive(false);
}
} |
c019a181-375b-4a82-88ae-7bd114e9838f | void gui() {
hint(DISABLE_DEPTH_TEST);
cam.beginHUD();
currCameraMatrix = new PMatrix3D(p3.camera);
camera();
cp5.cp5.draw();
p3.camera = currCameraMatrix;
cam.endHUD();
hint(ENABLE_DEPTH_TEST);
} |
3ea89f55-aba2-45cb-8b11-330515a3532e | public void numLevels(String theText){
mySkyscraper.myLevels.flush();
cp5.nl = Integer.parseInt(theText);
mySkyscraper.myLevels = new LevelStack(cp5.nl, cp5.lw, this);
} |
c517c7c7-dbf2-4b3d-b7ac-5cad37ef6c4e | public void lvlWidth(String theText){
cp5.lW = theText;
cp5.lw = Integer.parseInt(cp5.lW)*feet;
for (int i = 0; i < mySkyscraper.myLevels.myLevels.size(); i++){
lev = (Level)mySkyscraper.myLevels.myLevels.get(i);
lev.levelWidth = cp5.lw;
}
} |
9b68ebad-ec13-45a9-9f11-845c6228d2c4 | public cp5GUI(PApplet p){
parent = p;
cp5 = new ControlP5(parent);
} |
97cdff36-853e-45dc-a242-eee58368e7ec | public void initialize(){
nl = getInt("numLevels");
lw = getInt("lvlWidth")*feet;
} |
dacdbf28-c558-4043-be63-d75752fdd9dd | public int getInt(String name){
return Integer.parseInt(cp5.get(Textfield.class, name).getText());
} |
4bef2eb3-7caa-4195-b9b0-e9b41118ff40 | public void inCP5(){
g1 = cp5.addGroup("g1")
.setPosition(0, 11)
.setBackgroundHeight(100)
.setBackgroundColor(color(50,100))//.bringToFront()
.setLabel("Levels")
;
cp5.addTextfield("numLevels").setCaptionLabel("Number of Levels").setPosition(10,10).setSize(70, 15).setValue("1").setAutoClear(false).setGroup(g1);
cp5.addTextfield("lvlWidth").setCaptionLabel("Level Width").setPosition(10, 40).setSize(70, 15).setValue("40").setAutoClear(false).setGroup(g1);
cp5.addButton("addLevel").setCaptionLabel("Add Level").setPosition(10, 70).setSize(70, 15).setGroup(g1);
g2 = cp5.addGroup("g2")
.setPosition(0,121)
.setWidth(300)
.activateEvent(true)
.setBackgroundColor(color(50,100))
.setBackgroundHeight(100)
.setLabel("Hello World.")
.bringToFront()
.setMoveable(true)
;
cp5.addSlider("S-1")
.setPosition(80,10)
.setSize(180,9)
.setGroup(g2)
;
cp5.addSlider("S-2")
.setPosition(80,20)
.setSize(180,9)
.setGroup(g2)
;
cp5.addRadioButton("radio")
.setPosition(10,10)
.setSize(20,9)
.addItem("black",0)
.addItem("red",1)
.addItem("green",2)
.addItem("blue",3)
.addItem("grey",4)
.setGroup(g2)
;
cp5.setAutoDraw(false);
//ControlFrame is for seperate windows
/*cf = addControlFrame("extra", 200, 200);
*cf = addControlFrame("blank", 300, 200);
**/
} |
8d0692e8-995b-40e8-98b9-be697dd6fe5b | public void controlEvent(ControlEvent theEvent) {
if(theEvent.isGroup()) {
println("got an event from group "
+theEvent.getGroup().getName()
+", isOpen? "+theEvent.getGroup().isOpen()
+" " + theEvent.getGroup().isMouseOver()
);
} else if (theEvent.isController()){
println("got something from a controller "
+theEvent.getController().getName()
);
} else if (theEvent.isFrom("Set")){
noLoop();
//theEvent.getController().get
}
} |
6942ee4f-4521-42fd-8cdf-fc6c55451824 | public void keyPressed() {
if(key==' ') {
if(cp5.getGroup("g1")!=null) {
cp5.getGroup("g1").remove();
}
}
} |
9eff61c2-3e16-418b-9047-811d1b371c71 | public void setup() {
size(w, h);
frameRate(25);
cp5 = new ControlP5(this);
cp5.addSlider("abc").setRange(0, 255).setPosition(10,10);
cp5.addSlider("def").plugTo(parent,"def").setRange(0, 255).setPosition(10,30).setValue(250);
} |
d8b36a3f-7c09-4655-8fb4-9451f5ed9ab2 | public void draw() {
background(abc);
} |
8d4109b5-30f8-4ba8-bbd4-36eb9c4f4915 | public ControlFrame() {
} |
ea394d0c-50e9-455b-84dc-c44c200ba6a6 | public ControlFrame(Object theParent, int theWidth, int theHeight) {
parent = theParent;
w = theWidth;
h = theHeight;
} |
5f8e061f-8414-4755-81d3-d1ad0c0f00b9 | public ControlP5 control() {
return cp5;
} |
1fdc4889-e793-4e92-88ce-a41d7d241bc3 | public Skyscraper(int nl, int lw, PApplet p){
myLevels = new LevelStack(nl, lw, p); // initialize with 0 Levels
} |
62ccd733-0026-4e39-a8d7-d010ee9e2406 | public static void main(String[] args) {
System.out.println(HeaderType.valueOf("id").toString());
} |
4663c716-84ed-4a52-9823-38e44cdd5fa1 | public void metaData(String[] args); |
e3555639-1471-4b1f-bc93-320969cb1f1a | @Override
public void metaData(String[] args) {
MetaData.main(args);
} |
7e125687-c115-4e00-b2d9-0e134c4a29b4 | private HeaderType(String type) {
this.typeOf=type;
} |
50bfd248-0cff-4caa-b58c-7fe013143573 | public String toString(){
return typeOf;
} |
d1a3b171-77ce-4052-8171-00e0be8ffb0d | @Override
protected void setup(Context context) throws IOException,
InterruptedException {
headers = context.getConfiguration().get("header").trim()
.split("\\,");
} |
1e7c7373-6f5d-496f-8329-863a7abb6f3f | @Override
protected void map(LongWritable key, Text value, Context context)
throws IOException, InterruptedException {
String[] words = value.toString().split("\\,");
if (key.get() != 0) {
for (int i = 2; i < 11; i++) {
context.write(new Text(headers[i]), new Text(words[i]));
}
}
} |
510ab2f8-0a89-4d15-9cb4-43eccbc02d6b | @Override
protected void reduce(Text key, Iterable<Text> values, Context context)
throws IOException, InterruptedException {
System.out.println(HeaderType.valueOf(
key.toString().trim().replaceAll("\\ ", "")).toString());
switch (HeaderType.valueOf(
key.toString().trim().replaceAll("\\ ", "")).toString()) {
case "number":
System.out.println("number me for key ="+key.toString());
double max = Integer.MIN_VALUE;
double min = Integer.MAX_VALUE;
double avg = 0.0;
Integer count = 0;
for (Text value : values) {
double curr = Double.parseDouble(value.toString().trim());
max = max <= curr ? curr : max;
min = min >= curr ? curr : min;
avg += curr;
count++;
}
context.write(
key,
new Text("max=" + String.valueOf(max) + "\t min="
+ String.valueOf(min) + "\t AVg="
+ String.valueOf(avg / count)));
break;
case "words":
System.out.println("words me for key="+key.toString());
Map<String, Integer> countOfCat=new HashMap<String, Integer>();
count=0;
for (Text word : values) {
if (countOfCat.containsKey(word.toString())) {
count=countOfCat.get(word.toString()) ;
countOfCat.put(word.toString(), ++count);
}else{
countOfCat.put(word.toString(), 1);
}
}
String tmp=new String();
for (Entry<String, Integer> entry : countOfCat.entrySet()) {
tmp+=entry.getKey()+"="+entry.getValue()+"\t";
}
context.write(key, new Text(tmp));
break;
default:
break;
}
} |
d2d96722-1317-43a2-9015-e962af30ca5c | public static void main(String[] args) {
try {
Configuration configuration = new Configuration();
configuration
.set("header",
"id,tstamp,Queue Time,Hold Time,Talk Time,Agent Skill,Agent Tenure,Case Severity,Answer Within Service Level,Brand,Case Status,Product,Vendor,Location,Customer Satisfaction,Satisfaction with Agent,Brand - Satisfaction,Repurchase Likelihood,Recommend Likelihood,Problem Resolution,First Contact Resolution,Resolved within 2");
Job job = new Job(configuration);
job.setJarByClass(MetaData.class);
job.setJobName("Meata Data for valiables");
FileInputFormat.addInputPath(job, new Path(args[0]));
FileOutputFormat.setOutputPath(job, new Path(args[1]));
job.setInputFormatClass(TextInputFormat.class);
job.setOutputFormatClass(TextOutputFormat.class);
job.setOutputKeyClass(Text.class);
job.setOutputValueClass(Text.class);
job.setMapperClass(MetaDataMapper.class);
job.setReducerClass(MetaDataReducer.class);
job.waitForCompletion(true);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} |
a75f41af-4964-46dd-8656-f151b726f5b8 | private CarGasType(String prologValue) {
mFieldValue = prologValue;
} |
25b927ba-489d-459e-8417-05c1c84a77d8 | public String getPrologFieldName() {
return FIELD_NAME;
} |
1d9baa13-0db5-4096-9104-eba24d390b7d | public String getPrologFieldValue() {
return mFieldValue;
} |
49952b2f-8af2-4c33-961c-145724bd23b4 | private CarDoorsType(String prologValue) {
mFieldValue = prologValue;
} |
35387ab5-9775-48bf-bd0f-47b38446ad81 | public String getPrologFieldName() {
return FIELD_NAME;
} |
58f76280-ca9e-4162-81e2-1f53cd894201 | public String getPrologFieldValue() {
return mFieldValue;
} |
c1133043-7689-4d28-8c41-6a14a3a97f88 | private CarTrunkCapacityType(String prologValue) {
mFieldValue = prologValue;
} |
60e364e7-3e76-4290-aa98-4b227b5d198a | public String getPrologFieldName() {
return FIELD_NAME;
} |
18404b31-1a95-4e97-80c2-ee59c0cda641 | public String getPrologFieldValue() {
return mFieldValue;
} |
f86836ee-91a4-4830-8b4c-9c6ec399d857 | private CarManufacturerProductionType(String prologValue) {
mFieldValue = prologValue;
} |
4ed6318b-3df4-445d-afad-aae52dac5553 | public String getPrologFieldName() {
return FIELD_NAME;
} |
e351b711-9214-4a40-8b1f-a95a365e6fe2 | public String getPrologFieldValue() {
return mFieldValue;
} |
1efddd90-920c-4265-b7b3-bb98ba164b4d | public String getPrologFieldName(); |
b1c23bdc-4254-4c2f-a6c4-57b1a8bd704c | public String getPrologFieldValue(); |
905e655a-ee78-4c5f-96a2-9cc3d0963c7c | private CarBodyType(String prologValue) {
mFieldValue = prologValue;
} |
b1624722-3318-4434-af17-a19640ae202f | public String getPrologFieldName() {
return FIELD_NAME;
} |
ab223b3f-e5a1-47bc-b54f-3363039ed26a | public String getPrologFieldValue() {
return mFieldValue;
} |
b3d3654a-5e8f-4459-8daa-0a5d3da76ed4 | private CarTurboType(String prologValue) {
mFieldValue = prologValue;
} |
cd75dc0b-1989-4ec9-b8c1-a5a74e23ba3f | public String getPrologFieldName() {
return FIELD_NAME;
} |
a17731f5-132c-487c-be00-b3b2eeecde4b | public String getPrologFieldValue() {
return mFieldValue;
} |
e6046f2c-84d4-4b0f-93ef-8311304c408e | private CarPriceType(String prologValue) {
mFieldValue = prologValue;
} |
5e0035f4-5de2-4c05-8eb8-d1f18ca5b0a0 | public String getPrologFieldName() {
return FIELD_NAME;
} |
163f0665-20aa-4cae-ba7a-605e6120c965 | public String getPrologFieldValue() {
return mFieldValue;
} |
98632893-368c-48ff-9179-7f04769cd552 | private CarSuspensionType(String prologValue) {
mFieldValue = prologValue;
} |
61edc001-c1c8-43bc-9277-3943672906cd | public String getPrologFieldName() {
return FIELD_NAME;
} |
c3d75458-bb0a-4bfa-af03-52fff3b93ca8 | public String getPrologFieldValue() {
return mFieldValue;
} |
3ff13475-0514-4668-a0d4-cfc9381aca09 | public PrologCommunicator() {
initializeEnvironment();
} |
65b553fb-b562-4c36-ad5c-dd8864cc27bf | private void initializeEnvironment() {
Query query = new Query("consult('prolog/samochod.pl')");
if (!query.hasSolution()) {
System.out.println("consult('samochod.pl') failed");
System.exit(1);
}
} |
729711cb-4c29-483c-aee8-5232426d5793 | public void onPrologQueryRequested(
List<PrologModelApplicable> preconditionsList,
OnPrologQueryResultListener resultListener) {
clearEnvironmentPreconditions();
setEnvironmentPreconditions(preconditionsList);
performExpertConsultation(resultListener);
} |
1df455ee-f442-4778-bbac-6365fa017be3 | private void clearEnvironmentPreconditions() {
new Query(CLEAR_ENVIRONMENT_QUERY).hasSolution();
} |
ce8d3d5f-777f-46a3-b13c-f4c94dfe3129 | private void setEnvironmentPreconditions(
List<PrologModelApplicable> preconditionsList) {
Query preconditionQuery = null;
for (PrologModelApplicable precondition : preconditionsList) {
preconditionQuery = new Query(PRECONDITION_QUERY, new Term[] {
new Atom(precondition.getPrologFieldName()),
new Atom(precondition.getPrologFieldValue()) });
preconditionQuery.hasSolution();
preconditionQuery.close();
}
} |
945e5e10-fba2-49fa-9eed-6606948ef239 | private void performExpertConsultation(
OnPrologQueryResultListener resultListener) {
Variable x = new Variable("X");
Query q = new Query(ASK_EXPERT_QUERY, new Term[]{x});
List<String> carSolutions = new ArrayList<String>();
if (q.hasSolution()) {
for (Object object : q.allSolutions()) {
carSolutions.add("" + object + "\n");
}
} else {
carSolutions.add("There's no car matching the pattern.\n");
}
resultListener.onPrologQueryResultReceived(carSolutions);
} |
f3b3317d-d101-4db1-bca1-f625e610f699 | public RootFrame() {
super("An expert car chooser");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 578, 453);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
JPanel panel = new JPanel();
panel.setBounds(5, 5, 212, 398);
contentPane.add(panel);
panel.setLayout(null);
JComboBox<PrologModelApplicable> comboBox_1 = new JComboBox<PrologModelApplicable>();
comboBox_1.setModel(new DefaultComboBoxModel<PrologModelApplicable>(CarManufacturerProductionType.values()));
comboBox_1.setBounds(0, 21, 202, 19);
comboBox_1.setToolTipText("Choose country");
comboBox_1.setSelectedIndex(-1);
mPrologContentComboBoxes.add(comboBox_1);
panel.add(comboBox_1);
JComboBox<PrologModelApplicable> comboBox = new JComboBox<PrologModelApplicable>();
comboBox.setModel(new DefaultComboBoxModel<PrologModelApplicable>(CarSuspensionType.values()));
comboBox.setBounds(0, 66, 202, 19);
mPrologContentComboBoxes.add(comboBox);
comboBox.setSelectedIndex(-1);
panel.add(comboBox);
JComboBox<PrologModelApplicable> comboBox_3 = new JComboBox<PrologModelApplicable>();
mPrologContentComboBoxes.add(comboBox_3);
comboBox_3.setModel(new DefaultComboBoxModel<PrologModelApplicable>(CarGasType.values()));
comboBox_3.setBounds(0, 113, 202, 19);
comboBox_3.setSelectedIndex(-1);
panel.add(comboBox_3);
JComboBox<PrologModelApplicable> comboBox_2 = new JComboBox<PrologModelApplicable>();
mPrologContentComboBoxes.add(comboBox_2);
comboBox_2.setModel(new DefaultComboBoxModel<PrologModelApplicable>(CarDoorsType.values()));
comboBox_2.setBounds(0, 162, 202, 19);
comboBox_2.setSelectedIndex(-1);
panel.add(comboBox_2);
JLabel lblManufacturerCountry = new JLabel("Manufacturer country");
lblManufacturerCountry.setBounds(0, 0, 138, 14);
panel.add(lblManufacturerCountry);
JLabel lblBodyType = new JLabel("Suspension type");
lblBodyType.setBounds(0, 51, 138, 14);
panel.add(lblBodyType);
JLabel lblGasType = new JLabel("Gas type");
lblGasType.setBounds(0, 96, 138, 14);
panel.add(lblGasType);
JLabel lblNewLabel_1 = new JLabel("Doors amount");
lblNewLabel_1.setBounds(0, 148, 95, 14);
panel.add(lblNewLabel_1);
JLabel lblPrice = new JLabel("Price");
lblPrice.setBounds(0, 192, 138, 14);
panel.add(lblPrice);
JComboBox<PrologModelApplicable> comboBox_4 = new JComboBox<PrologModelApplicable>();
comboBox_4.setModel(new DefaultComboBoxModel<PrologModelApplicable>(CarPriceType.values()));
comboBox_4.setBounds(0, 210, 202, 19);
comboBox_4.setSelectedIndex(-1);
mPrologContentComboBoxes.add(comboBox_4);
panel.add(comboBox_4);
JLabel lblTurboType = new JLabel("Turbo type");
lblTurboType.setBounds(0, 241, 138, 14);
panel.add(lblTurboType);
JComboBox<PrologModelApplicable> comboBox_5 = new JComboBox<PrologModelApplicable>();
comboBox_5.setModel(new DefaultComboBoxModel<PrologModelApplicable>(CarTurboType.values()));
comboBox_5.setBounds(0, 257, 202, 19);
comboBox_5.setSelectedIndex(-1);
mPrologContentComboBoxes.add(comboBox_5);
panel.add(comboBox_5);
JLabel lblTrunkType = new JLabel("Trunk type");
lblTrunkType.setBounds(0, 287, 138, 14);
panel.add(lblTrunkType);
JComboBox<PrologModelApplicable> comboBox_6 = new JComboBox<PrologModelApplicable>();
comboBox_6.setModel(new DefaultComboBoxModel<PrologModelApplicable>(CarTrunkCapacityType.values()));
comboBox_6.setBounds(0, 303, 202, 19);
comboBox_6.setSelectedIndex(-1);
mPrologContentComboBoxes.add(comboBox_6);
panel.add(comboBox_6);
JButton btnNewButton = new JButton("Reset choices");
btnNewButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
mExpertAnswerRootPane.setText("");
for (JComboBox<PrologModelApplicable> comboBox : mPrologContentComboBoxes) {
comboBox.setSelectedIndex(-1);
}
}
});
btnNewButton.setBounds(38, 364, 138, 23);
panel.add(btnNewButton);
JPanel panel_1 = new JPanel();
panel_1.setBounds(217, 5, 338, 398);
contentPane.add(panel_1);
panel_1.setLayout(null);
JLabel lblNewLabel = new JLabel("Choose properties and ask the expert.");
lblNewLabel.setBounds(59, 11, 226, 14);
panel_1.add(lblNewLabel);
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
JButton btnAskExpert = new JButton("Ask Expert");
btnAskExpert.setBounds(89, 36, 163, 23);
btnAskExpert.addActionListener(new AskExpertButtonActionListener());
panel_1.add(btnAskExpert);
mExpertAnswerRootPane = new JTextPane();
mExpertAnswerRootPane.setBounds(21, 69, 292, 318);
//panel_1.add(mExpertAnswerRootPane);
JScrollPane pane = new JScrollPane(mExpertAnswerRootPane);
pane.setBounds(21, 69, 292, 318);
panel_1.add(pane);
} |
86158be7-d1e4-4ff1-9c73-e5f7fbf3cbc1 | public void actionPerformed(ActionEvent arg0) {
mExpertAnswerRootPane.setText("");
for (JComboBox<PrologModelApplicable> comboBox : mPrologContentComboBoxes) {
comboBox.setSelectedIndex(-1);
}
} |
276a8d6e-e318-4f1c-9934-68ba3e000f8a | public void setOnPrologQueryRequestedListener(OnPrologQueryRequestedListener listener) {
mOnQueryRequestedListener = listener != null ?
listener : new EmptyOnPrologQueryRequestedListener();
} |
68d017ef-9995-4453-b2a8-521f3e515a46 | public void onPrologQueryResultReceived(List<String> associatedCarsList) {
if (associatedCarsList == null)
return;
for (String car : associatedCarsList) {
updateTextPane(car);
}
} |