Beispiel #1
0
 @Override
 public void setAnsiConformanceLevel(int level) {
   if (level == 1 || level == 2) {
     myGraphicSetState.designateGraphicSet(0, CharacterSet.ASCII); // ASCII designated as G0
     myGraphicSetState.designateGraphicSet(
         1,
         CharacterSet
             .DEC_SUPPLEMENTAL); // TODO: not DEC supplemental, but ISO Latin-1 supplemental
                                 // designated as G1
     mapCharsetToGL(0);
     mapCharsetToGR(1);
   } else if (level == 3) {
     designateCharacterSet(0, 'B'); // ASCII designated as G0
     mapCharsetToGL(0);
   } else {
     throw new IllegalArgumentException();
   }
 }
Beispiel #2
0
  public void restoreCursor(@NotNull StoredCursor storedCursor) {
    myCursorX = storedCursor.getCursorX();
    myCursorY = storedCursor.getCursorY();

    myStyleState.setCurrent(storedCursor.getTextStyle().clone());

    setModeEnabled(TerminalMode.AutoWrap, storedCursor.isAutoWrap());
    setModeEnabled(TerminalMode.OriginMode, storedCursor.isOriginMode());

    CharacterSet[] designations = storedCursor.getDesignations();
    for (int i = 0; i < designations.length; i++) {
      myGraphicSetState.designateGraphicSet(i, designations[i]);
    }
    myGraphicSetState.setGL(storedCursor.getGLMapping());
    myGraphicSetState.setGR(storedCursor.getGRMapping());

    if (storedCursor.getGLOverride() >= 0) {
      myGraphicSetState.overrideGL(storedCursor.getGLOverride());
    }
  }
Beispiel #3
0
 @Override
 public void designateCharacterSet(int tableNumber, char charset) {
   GraphicSet gs = myGraphicSetState.getGraphicSet(tableNumber);
   myGraphicSetState.designateGraphicSet(gs, charset);
 }