FreeRDP
Loading...
Searching...
No Matches
com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings Class Reference
Inheritance diagram for com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings:
Collaboration diagram for com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings:

Public Member Functions

 ScreenSettings (Parcel parcel)
 
void setResolution (String resolution, int width, int height)
 
int getResolution ()
 
void setResolution (int resolution)
 
String getResolutionString ()
 
boolean isPredefined ()
 
boolean isAutomatic ()
 
boolean isFitScreen ()
 
boolean isCustom ()
 
int getWidth ()
 
void setWidth (int width)
 
int getHeight ()
 
void setHeight (int height)
 
int getColors ()
 
void setColors (int colors)
 
int describeContents ()
 
void writeToParcel (Parcel out, int flags)
 

Static Public Attributes

static final int FITSCREEN = -2
 
static final int AUTOMATIC = -1
 
static final int CUSTOM = 0
 
static final int PREDEFINED = 1
 
static final Parcelable.Creator< ScreenSettingsCREATOR
 

Detailed Description

Definition at line 535 of file BookmarkBase.java.

Constructor & Destructor Documentation

◆ ScreenSettings() [1/2]

com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.ScreenSettings ( )
inline

Definition at line 558 of file BookmarkBase.java.

559 {
560 init();
561 }

◆ ScreenSettings() [2/2]

com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.ScreenSettings ( Parcel  parcel)
inline

Definition at line 563 of file BookmarkBase.java.

564 {
565 resolution = parcel.readInt();
566 colors = parcel.readInt();
567 width = parcel.readInt();
568 height = parcel.readInt();
569 }

Member Function Documentation

◆ describeContents()

int com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.describeContents ( )
inline

Definition at line 725 of file BookmarkBase.java.

726 {
727 return 0;
728 }

◆ getColors()

int com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.getColors ( )
inline

Definition at line 714 of file BookmarkBase.java.

715 {
716 validate();
717 return colors;
718 }

◆ getHeight()

int com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.getHeight ( )
inline

Definition at line 703 of file BookmarkBase.java.

704 {
705 validate();
706 return height;
707 }

◆ getResolution()

int com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.getResolution ( )
inline

Definition at line 644 of file BookmarkBase.java.

645 {
646 return resolution;
647 }

◆ getResolutionString()

String com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.getResolutionString ( )
inline

Definition at line 660 of file BookmarkBase.java.

661 {
662 if (isPredefined())
663 return (width + "x" + height);
664
665 return (isFitScreen() ? "fitscreen" : isAutomatic() ? "automatic" : "custom");
666 }

◆ getWidth()

int com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.getWidth ( )
inline

Definition at line 692 of file BookmarkBase.java.

693 {
694 validate();
695 return width;
696 }

◆ isAutomatic()

boolean com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.isAutomatic ( )
inline

Definition at line 674 of file BookmarkBase.java.

675 {
676 validate();
677 return (resolution == AUTOMATIC);
678 }

◆ isCustom()

boolean com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.isCustom ( )
inline

Definition at line 686 of file BookmarkBase.java.

687 {
688 validate();
689 return (resolution == CUSTOM);
690 }

◆ isFitScreen()

boolean com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.isFitScreen ( )
inline

Definition at line 680 of file BookmarkBase.java.

681 {
682 validate();
683 return (resolution == FITSCREEN);
684 }

◆ isPredefined()

boolean com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.isPredefined ( )
inline

Definition at line 668 of file BookmarkBase.java.

669 {
670 validate();
671 return (resolution == PREDEFINED);
672 }

◆ setColors()

void com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.setColors ( int  colors)
inline

Definition at line 720 of file BookmarkBase.java.

721 {
722 this.colors = colors;
723 }

◆ setHeight()

void com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.setHeight ( int  height)
inline

Definition at line 709 of file BookmarkBase.java.

710 {
711 this.height = height;
712 }

◆ setResolution() [1/2]

void com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.setResolution ( int  resolution)
inline

Definition at line 649 of file BookmarkBase.java.

650 {
651 this.resolution = resolution;
652
653 if (resolution == AUTOMATIC || resolution == FITSCREEN)
654 {
655 width = 0;
656 height = 0;
657 }
658 }

◆ setResolution() [2/2]

void com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.setResolution ( String  resolution,
int  width,
int  height 
)
inline

Definition at line 617 of file BookmarkBase.java.

618 {
619 if (resolution.contains("x"))
620 {
621 String[] dimensions = resolution.split("x");
622 this.width = Integer.parseInt(dimensions[0]);
623 this.height = Integer.parseInt(dimensions[1]);
624 this.resolution = PREDEFINED;
625 }
626 else if (resolution.equalsIgnoreCase("custom"))
627 {
628 this.width = width;
629 this.height = height;
630 this.resolution = CUSTOM;
631 }
632 else if (resolution.equalsIgnoreCase("fitscreen"))
633 {
634 this.width = this.height = 0;
635 this.resolution = FITSCREEN;
636 }
637 else
638 {
639 this.width = this.height = 0;
640 this.resolution = AUTOMATIC;
641 }
642 }

◆ setWidth()

void com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.setWidth ( int  width)
inline

Definition at line 698 of file BookmarkBase.java.

699 {
700 this.width = width;
701 }

◆ writeToParcel()

void com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.writeToParcel ( Parcel  out,
int  flags 
)
inline

Definition at line 730 of file BookmarkBase.java.

731 {
732 out.writeInt(resolution);
733 out.writeInt(colors);
734 out.writeInt(width);
735 out.writeInt(height);
736 }

Field Documentation

◆ AUTOMATIC

final int com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.AUTOMATIC = -1
static

Definition at line 538 of file BookmarkBase.java.

◆ CREATOR

final Parcelable.Creator<ScreenSettings> com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.CREATOR
static
Initial value:
=
new Parcelable.Creator<ScreenSettings>() {
public ScreenSettings createFromParcel(Parcel in)
{
return new ScreenSettings(in);
}
@Override public ScreenSettings[] newArray(int size)
{
return new ScreenSettings[size];
}
}

Definition at line 541 of file BookmarkBase.java.

542 {
543 public ScreenSettings createFromParcel(Parcel in)
544 {
545 return new ScreenSettings(in);
546 }
547
548 @Override public ScreenSettings[] newArray(int size)
549 {
550 return new ScreenSettings[size];
551 }
552 };

◆ CUSTOM

final int com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.CUSTOM = 0
static

Definition at line 539 of file BookmarkBase.java.

◆ FITSCREEN

final int com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.FITSCREEN = -2
static

Definition at line 537 of file BookmarkBase.java.

◆ PREDEFINED

final int com.freerdp.freerdpcore.domain.BookmarkBase.ScreenSettings.PREDEFINED = 1
static

Definition at line 540 of file BookmarkBase.java.


The documentation for this class was generated from the following file: