File size: 612 Bytes
04f192c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # SPDX-FileCopyrightText: Copyright contributors to the CopilotJ project.
#
# SPDX-License-Identifier: Apache-2.0
from typing import Literal
from copilotj.plugin.awt._base import ActionResponse, ComponentBase, str_or_empty
__all__ = ["TextAreaNode", "TextAreaSetTextResponse"]
class TextAreaNode(ComponentBase[Literal["java.awt.TextArea"]]):
text: str | None # text can be null if component.getText() is null
def _describe_one_line(self) -> str:
return f"TextArea: text={str_or_empty(self.text)}"
type TextAreaSetTextResponse = ActionResponse[Literal["java.awt.TextArea.setText"], None]
|