Examples of CursorPosition


Examples of org.jboss.aesh.terminal.CursorPosition

    private void drawHorizontalLine(int x, int y, int width) {
        TerminalSize terminalSize = graphicsConfiguration.getBounds();
        if(terminalSize.getHeight() > y && terminalSize.getWidth() > y) {
            if(terminalSize.getWidth() < x + width)
                width = terminalSize.getWidth() - x-1;
            shell.setCursor(new CursorPosition(y,x));
            char[] line = new char[width];
            for(int i=0; i < line.length; i++) {
                if(i == 0 || i == line.length-1)
                    line[i] = 'x';
                else
View Full Code Here

Examples of org.jboss.aesh.terminal.CursorPosition

    private void drawVerticalLine(int x, int y, int length) {
        TerminalSize terminalSize = graphicsConfiguration.getBounds();
        if(terminalSize.getHeight() > y && terminalSize.getWidth() > y) {
            if(terminalSize.getHeight() < y + length)
                length = terminalSize.getHeight() - y-1;
            shell.setCursor(new CursorPosition(y,x));
            for(int i=0; i < length; i++) {
                shell.out().print('|');
                shell.out().print(CURSOR_DOWN);
            }
        }
View Full Code Here

Examples of org.jboss.aesh.terminal.CursorPosition

                    return getActualCursor(console.cursorQueue.take());
                }
                catch (Exception e) {
                    if(console.settings.isLogging())
                        console.LOGGER.log(Level.SEVERE, "Failed to find current row with ansi code: ",e);
                    return new CursorPosition(-1,-1);
                }
            }
            return new CursorPosition(-1,-1);
        }
View Full Code Here

Examples of org.jboss.aesh.terminal.CursorPosition

                    started = true;
                    i++;
                }
            }

            return new CursorPosition(row, col);
        }
View Full Code Here

Examples of org.jboss.aesh.terminal.CursorPosition

                     col.append((char) input[i]);
                  else
                     row.append((char) input[i]);
               }
            }
            return new CursorPosition(Integer.parseInt(row.toString()),
                     Integer.parseInt(col.toString()));
         }
         catch (Exception e)
         {
            if (settings.isLogging())
               logger.log(Level.SEVERE,
                        "Failed to find current row with ansi code: ", e);
            return new CursorPosition(-1, -1);
         }
      }
      return new CursorPosition(-1, -1);
   }
View Full Code Here

Examples of org.jboss.aesh.terminal.CursorPosition

   }

   @Override
   public void moveCursor(int rows, int columns)
   {
      CursorPosition cp = getCursor();
      cp.move(rows, columns);
      if (getSize().isPositionWithinSize(cp))
      {
         setCursor(cp);
      }
   }
View Full Code Here

Examples of org.jboss.aesh.terminal.CursorPosition

                    return getActualCursor(console.cursorQueue.take());
                }
                catch (Exception e) {
                    if(console.settings.isLogging())
                        console.logger.log(Level.SEVERE, "Failed to find current row with ansi code: ",e);
                    return new CursorPosition(-1,-1);
                }
            }
            return new CursorPosition(-1,-1);
        }
View Full Code Here

Examples of org.jboss.aesh.terminal.CursorPosition

                    started = true;
                    i++;
                }
            }

            return new CursorPosition(row, col);
        }
View Full Code Here

Examples of org.jboss.aesh.terminal.CursorPosition

        int dx = x2 - x1;
        int dy = y2 -y1;
        int y = 0;
        for(int i=x1; i < x2; i++) {
            y = y1 + (dy) * (i - x1)/(dx);
            shell.setCursor(new CursorPosition(y,i));
            shell.out().print('x');
        }
    }
View Full Code Here

Examples of org.jboss.aesh.terminal.CursorPosition

    @Override
    public void drawString(String str, int x, int y) {
        if(currentColor != null)
            shell.out().print(currentColor.fullString());
        shell.setCursor(new CursorPosition(y,x));
        shell.out().print(str);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.