EditorCell cell = ... // get the editor cell EditorCell.Style style = cell.getStyle(); // get the style of the cell Color bgColor = style.getBackground(); // get the background color Font font = style.getFont(); // get the font
EditorCell cell = ... // get the editor cell EditorCell.Style style = new EditorCell.Style() .withBackground(Color.WHITE) .withForeground(Color.BLACK) .withFont(new Font("Arial", Font.PLAIN, 16)); cell.setStyle(style); // set the style of the cellIn this example, we create a new EditorCell.Style object and set its attributes using the withBackground(), withForeground(), and withFont() methods. We then set the cell's style using the setStyle() method. The Jetbrains MPS OpenAPI is a package library that provides a set of APIs and classes that can be used to develop custom editors and language extensions in the MPS platform.