com.rathravane.drumlin.app.userAgents.genericAgent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of drumlin Show documentation
Show all versions of drumlin Show documentation
A simple Java webapp framework with POJO path routing, Velocity templates, and basic
app functionality such as HTML form validation.
package com.rathravane.drumlin.app.userAgents;
import com.rathravane.drumlin.app.userAgents.browsers.browser;
import com.rathravane.drumlin.app.userAgents.browsers.genericBrowser;
import com.rathravane.drumlin.app.userAgents.devices.device;
import com.rathravane.drumlin.app.userAgents.devices.genericDevice;
/**
* Used when the user agent is a completely generic/unknown system.
* @author peter
*/
public class genericAgent implements userAgent
{
public genericAgent ()
{
this ( new genericDevice(), new genericBrowser () );
}
public genericAgent ( device d, browser b )
{
fDevice = d;
fBrowser = b;
}
@Override
public String getDeviceName ()
{
return fDevice.getName ();
}
@Override
public String getOsName ()
{
return fDevice.getOsName ();
}
@Override
public String getOsVersion ()
{
return fDevice.getOsVersion ();
}
@Override
public String getBrowserCanonicalName ()
{
return fBrowser.getName ();
}
@Override
public String getBrowserCanonicalVersion ()
{
return fBrowser.getVersion ();
}
@Override
public boolean getIsMobile ()
{
return fDevice.isMobile ();
}
@Override
public boolean getIsFixedScreenSize ()
{
return fDevice.getScreenInfo ().isFixedSize ();
}
@Override
public int getScreenWidth ()
{
return fDevice.getScreenInfo ().getWidth ();
}
@Override
public int getScreenHeight ()
{
return fDevice.getScreenInfo ().getHeight ();
}
@Override
public int getScreenDpi ()
{
return fDevice.getScreenInfo ().getDpi ();
}
private final device fDevice;
private final browser fBrowser;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy