mirror of
https://github.com/DanilaFe/abacus
synced 2024-11-17 08:03:09 -08:00
Add a documentation class.
This commit is contained in:
parent
e61cfdca46
commit
5f80c0bf14
36
src/main/java/org/nwapw/abacus/fx/DocumentationCell.java
Normal file
36
src/main/java/org/nwapw/abacus/fx/DocumentationCell.java
Normal file
|
@ -0,0 +1,36 @@
|
|||
package org.nwapw.abacus.fx;
|
||||
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.ListCell;
|
||||
import org.nwapw.abacus.function.Documentation;
|
||||
|
||||
public class DocumentationCell extends ListCell<Documentation> {
|
||||
|
||||
private Label codeNameLabel;
|
||||
private Label nameLabel;
|
||||
private Label description;
|
||||
private Label longDescription;
|
||||
|
||||
public DocumentationCell(){
|
||||
codeNameLabel = new Label();
|
||||
nameLabel = new Label();
|
||||
description = new Label();
|
||||
longDescription = new Label();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateItem(Documentation item, boolean empty) {
|
||||
super.updateItem(item, empty);
|
||||
if(empty){
|
||||
codeNameLabel.setText("");
|
||||
nameLabel.setText("");
|
||||
description.setText("");
|
||||
longDescription.setText("");
|
||||
} else {
|
||||
codeNameLabel.setText(item.getCodeName());
|
||||
nameLabel.setText(item.getName());
|
||||
description.setText(item.getDescription());
|
||||
longDescription.setText(item.getLongDescription());
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user