com.jk.application.impl.DefaultUIWidgetFactorty Maven / Gradle / Ivy
The newest version!
package com.jk.application.impl;
import java.util.Properties;
import java.util.Scanner;
import com.jk.application.api.Application;
import com.jk.application.exceptions.ViewCreationException;
import com.jk.application.ui.UIApplicationFrame;
import com.jk.application.ui.UIFrame;
import com.jk.application.ui.UIView;
import com.jk.application.ui.UIWidgetFactory;
public class DefaultUIWidgetFactorty implements UIWidgetFactory {
@Override
public boolean showConfirmation(String message) {
System.out.print(message+" [yes, no]");
Scanner scanner = new Scanner(System.in);
String input=scanner.next().toLowerCase();
if(input.equals("yes")) {
return true;
}
if(input.equals("no")) {
return false;
}
return showConfirmation(message);
}
@Override
public void showWarning(String message) {
System.err.println(message);
}
@Override
public UIView createView(Properties prop, boolean createNew) throws ViewCreationException {
// TODO Auto-generated method stub
return null;
}
@Override
public void showSplash(String splashImage) {
// TODO Auto-generated method stub
}
@Override
public void disposeSplash() {
// TODO Auto-generated method stub
}
@Override
public void showSplash(String title, String splashImage) {
// TODO Auto-generated method stub
}
@Override
public UIApplicationFrame createApplicationFrame(Application application) {
// TODO Auto-generated method stub
return null;
}
@Override
public void setDefaultMainFrame(UIFrame applicationFrame) {
// TODO Auto-generated method stub
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy